Running a Script from the onLoad Event Handler
<HTML> <HEAD> <TITLE>An onLoad script</TITLE> <SCRIPT LANGUAGE="JavaScript"> <!-- function done() { alert("The page has finished loading.") } // --> </SCRIPT> </HEAD> <BODY onLoad="done()"> Here is some body text. </BODY> </HTML>