asp.net.ph

Skip Navigation Links

detachEvent Method

DHTML Methods


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



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

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