Previous Example-|-Next Example-|-Return to Chapter Listing

Example 2.7:
Welcome Messages (Using onload)



When you loaded this page you should have seen the emergency message in a JavaScript Alert dialog box. This time, though, the message appeared after the document had loaded. You can use the browser's Reload command to see the message again.



This is the script we used: <BODY onload="alert('Welcome to the World Wide Web\'s Premier slug-farming page. Unfortunately we have some bad news. Uncle Albert slipped while walking across the pasture last night, and will be unable to maintain this site for a few days. Don\'t worry though, he\'ll be back just as soon as we can get the slime off.')"> </HEAD>
Previous Example-|-Next Example-|-Return to Chapter Listing