JS Time bubbling and capturing

Source: Internet
Author: User

Bubbling: The event is first triggered on the target element, then the event bubbles from inside to outside its root element, which is then triggered by its parent element (such as the A-element binding click event, click A, the click event is triggered from the a element up to the document element in turn)

Capture: The event that is triggered is first captured by the root element of the target element and then captured by its child elements, in turn, from outside to inside.

How to use:

Target.addeventlistener (Type, listener[, Usecapture]);
Usecapture is a Boolean value that controls whether the event bubbling mechanism is turned on. The default is: false, which means that only bubbling events occur by default and no capture events occur.

JS Time bubbling and capturing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.