Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

onunload event

Fires immediately before the object is unloaded.

HTML 4.01 Specification, Section 18.2.3

Syntax

HTML Attribute <element onunload = "handler(event)">
Event Property object.onunload = handler;
attachEvent Method object.attachEvent("onunload", handler)

Event information

SynchronousNo
BubblesNo
CancelableNo

Event handler parameters

pEvtObj [in]

Type: IHTMLEventObj

Standards information

Remarks

If you call window.IHTMLWindow2::open from this event, the Pop-up Blocker feature in Microsoft Internet Explorer 6 prevents the pop-up window from appearing.

Removes the object or document from the browser window.

To invoke this event, do one of the following:

For security reasons, the HTMLWindowEvents::onunload event does not open modeless dialog boxes, such as those created with the IHTMLWindow2::alert method or the IHTMLWindow3::showModelessDialog method. This changes affects webpages displayed in IE9 Standards mode or later document modes.

The pEvtObj parameter is required for the following interfaces:

See also

Reference
HTMLWindowEvents::onload
HTMLWindowEvents::onbeforeunload
Conceptual
About the Pop-up Blocker

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.