document.onload : onload « Document « JavaScript Tutorial






Syntax

onLoad="command"

The onLoad event handler of the Document object is fired when the page has finished loading.

This event handler actually belongs to the Window object but is accessible through the Document object.

The onload event in the of a document that is loaded in a frame will fire before an event loaded in the tag that loaded the document.

<html>
    <body onload='alert("The document has completely loaded.")'>
</html>
14.25.onload
14.25.1.document.onload