JS Add/delete events in IE and dom browsers are: attachEvent (add event in ie), detachEvent (delete event in ie), and addEventListener (add event in dom browser ), removeEventListener (supports deletion events in the dom browser ).
For example, when you click the black area for the first time, a warning is displayed, and the click event is removed. That is, the second click does not respond. The integrated code is as follows:
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <ptml xmlns = "http://www.w3.org/1999/xhtml"> <pead> <meta http-equiv =" content-Type "content =" text/html; charset = gb2312 "/> <title> Add Delete event </title> </pead> <body> <p> A warning is displayed when you click the black area for the first time, and the click event is removed, that is, the second click did not respond </p> the first point I warned you, the second point I ignored you! </Body> </ptml>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]