The Unload Event (onunload)

The Unload event occurs when the user leaves the current web page. The event handler used for this event is onunload.

Example:


<body onunload = "window.alert('Subscribe and come back!');>
   Content of the body goes here.
</body>

Leave a Reply