Section 25.306. Window.onload: event handler invoked when a document finishes loading


25.306. Window.onload: event handler invoked when a document finishes loading

JavaScript 1.0:

25.306.1. Synopsis

 Function onload 

25.306.2. Description

The onload property of a Window specifies an event handler function that is invoked when a document or frameset is completely loaded into its window or frame.

The initial value of this property is a function that contains the semicolon-separated JavaScript statements specified by the onload attribute of the <body> or <frameset> tags.

When the onload event handler is invoked, you can be certain that the document has fully loaded, and therefore that all scripts within the document have executed, all functions within scripts are defined, and all document elements have been parsed and are available through the Document object.

You can use Window.addEventListener( ) or Window.attachEvent( ) to register multiple event-handler functions for onload events.

25.306.3. See Also

Window.onunload; Section 13.5.7, "Manipulating the Document During Loading," Example 17-7, Chapter 17




JavaScript. The Definitive Guide
JavaScript: The Definitive Guide
ISBN: 0596101996
EAN: 2147483647
Year: 2004
Pages: 767

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net