JavaScript Event Handlers :Loading/ Unloading a Document
<html> <head> <title>Load/Unload Example</title> <script language="JavaScript"> <!-- function checkBrowser() { alert("load"); } function clean() { alert("unload"); } // --> </script> </head> <body onLoad="checkBrowser()" onUnload="clean()"> <font color="#008000"> <center><big><b>Intranet Home Page</b></big></center> </body> </html>