I originally thought that span was different from input, and event bubbling would be swallowed up by the parent tag. I wrote a demo to test event bubbling, but found that it was not what I thought. In addition: event.stopPropagation() and event.stopImmediatePropagation() cannot prevent span from bubbling into the a tag, but the simple and crudereturn falsecan.
Bubbling span tag in div
in div
span tag in anchor
span tag in anchor
The above is the detailed content of How to implement Html event bubbling. For more information, please follow other related articles on the PHP Chinese website!