JavaScript DHTML/Event onMethod/onUnload
"onUnload" Example
<source lang="html4strict">
<html> <body onunload="alert("Exiting the page!")"> </body> </html>
</source>
<source lang="html4strict">
<html> <body onunload="alert("Exiting the page!")"> </body> </html>
</source>