Home  >  Article  >  Web Front-end  >  javascript delete event function code of dom object_javascript skills

javascript delete event function code of dom object_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:28:361062browse

JS add/delete events in IE and DOM browsers are: attachEvent (add event in IE), detachEvent (delete event in IE), addEventListener (support add event in DOM browser), removeEventListener (support DOM browsing) delete event in the server).

For example, when you click on the black area for the first time, a warning will pop up and the click event will be removed. That means there will be no response when you click it for the second time. The integration code is as follows:


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn