Home > Web Front-end > JS Tutorial > Document.addEventListener usage introduction_javascript skills

Document.addEventListener usage introduction_javascript skills

WBOY
Release: 2016-05-16 16:56:21
Original
1695 people have browsed it

document.addEventListener("Event name", function, false);

Copy code The code is as follows:

function a function (event){
// method execution
}

The last parameter in addEventListener determines the response order of the event;

if true The order of event execution is addEventListener ---- the onclick event of the label ---- document.onclick

If it is false, the order of events is the onclick event of the label ---- document.onclick ---- addEventListener

is understood as the call entry point for other codes
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template