JavaScript Tutorial/Window/onload
Use alert dialog in only event
<source lang="javascript">
<html>
<head> <title>Onload Example</title> <body onload="alert("Loaded")"> </body>
</html></source>
Window onload event
<source lang="javascript">
<html>
<head> <title>Onload Example</title> <script type="text/javascript"> window.onload = function () { alert("Loaded"); }; </script> <body> </body>
</html></source>