Home > Web Front-end > JS Tutorial > Prevent JavaScript event bubbling (cancelBubble, stopPropagation)_javascript skills

Prevent JavaScript event bubbling (cancelBubble, stopPropagation)_javascript skills

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-16 19:13:45
Original
1085 people have browsed it

cancelBubble is valid under IE
stopPropagation is valid under Firefox

Copy code The code is as follows:




Prevent JavaScript event bubbling (cancelBubble, stopPropagation)





This is parent1 div.


This is child1.



This is parent1 div.






< ;p>This is parent2 div.


This is child2. Will bubble.



This is parent2 div.

/div>



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