DHTML Methods
Unbinds the specified function to the event so that the function stops being called whenever the event fires on the object.
object.detachEvent ( sEvent, fpNotify )
sEvent |
Required. Specifies the name of the event. |
fpNotify |
Required. Specifies the function previously set using the attachEvent method. |
No return value.
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>
attachEvent