Web Teacher Software
web database
Javacript 
Tutorial
CGI tutorial
web 
database consulting
web database training
contact us about web 
database software
press
Hosted Database Solutions
webteacher home
Web Teacher Consulting

javascript tutorial graphic


Webteacher Software now offers

onUnload Events

As you may have guessed, the onUnload() event handler will trigger an event when the user exits the current page.

I had this page open into a new window so that you can experiment with the onUnload event handler without losing your place in the tutorial.

Here is the <BODY> tag at the top of this document.

<BODY BGCOLOR="white" onUnload="alert('Please come back soon')"

Use any method you like to leave this page. Click the back button, type a URL into the location box, reload, close the window, or follow a link like this one.
Click to see a cute animation.

No matter how you leave the page the onUnload() event will trigger.

Yes you can use onUnload to make a page difficult to leave, but this would quickly result in a very lonely web site.

Next Page

Home | WebData - Web Database Software | Javascript | CGI | Consulting | Map Builder | Contact Us | The Press Room