Availability: |
| ||||||
Property/method value type: | Function object | ||||||
JavaScript syntax: | - | myWindow.onunload | |||||
- | myWindow.onunload = aHandler | ||||||
- | onunload | ||||||
- | onunload = aHandler | ||||||
HTML syntax: | <BODY onUnload="aHandler"> <FRAMESET onUnload="aHandler"> | ||||||
Argument list: | aHandler | An event handler function object |
This is called when a <BODY> or <FRAMESET> is about to be replaced by some new content.
The onunload event handler is a function which is represented by an object that is referred to by this property. Because it is stored in a property, you can change the handler by storing a reference to a different function object in this property.
The handler is registered either by assigning a function to the onfocus property or by defining it with an HTML tag attribute.
In a frame-set collection, the individual onunload handlers for each frame will be called in turn before the onunload event handler for the <FRAMESET> is called.
Use of this event handler is discouraged on the WebTV platform. There are limitations on its availability at certain times during alert and refresh actions.
See also: | JellyScript, onLoad, onUnload, Window.onload |
Prev | Home | Next |
Window.onresize | Up | Window.open() |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |