August 1999
Intermediate to advanced
1488 pages
72h 53m
English
onLoad="command"
The onLoad event handler of the Document object is fired when the page has finished loading in that particular window instance. This event handler actually belongs to the Window object but is accessible through the Document object.
Note
The onLoad event in the <body> of a document that is loaded in a frame will fire before an event loaded in the <frameset> tag that loaded the document.
The sample of code in Listing 7.151 pops up an alert box when the page has finished loading using the onLoad event handler.
<body onLoad='alert("The document has completely loaded.")'> |
Read now
Unlock full access