aspxtreme

detachEvent Method

DHTML Methods


Internet Explorer® 5 and up only.

Unbinds the specified function to the event so that the function stops being called whenever the event fires on the object.

Syntax


object.detachEvent ( sEvent, fpNotify ) 
Parameters

sEvent Required. Specifies the name of the event.
fpNotify Required. Specifies the function previously set using the attachEvent method.

Return Value

No return value.

Example

The following example demonstrates how a behavior could stop being notified whenever the onload event fires.

<script language="JScript">
window.detachEvent ( "onload", myOnLoad );
function myOnLoad ( ) {
// perform peer initialization here...
window.status = "myOnLoad function got called.";
}
</script>
See Also

attachEvent



Books and more ...

Contents
HTML Elements / DOM Objects
HTML Element Attributes
CSS Attributes
DOM Object Properties
DOM-compliant Events Reference
DOM Methods Reference
DOM Collections Reference
 


Suggested Reading



Previous page Back to top Next page

Check out related books at Amazon

© 2000-2008 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support aspxtreme