JS Bubbling Event Node

Source: Internet
Author: User

1. Event Bubbling: Event bubbling is from the inside out, it is bubbling up along the DOM level, directly to the top, and the HTML element can accept the bubbling event. 2. Event Capture: Event capture is from the outside to the inside, it is from the top of the DOM hierarchy down to the bottom, event capture can also be a window-level event, but need to display the specified 3.DOM event stream: Dom supports both event capture and event bubbling, but event capture takes precedence and two events      A stream can traverse all objects in the DOM, and the start and end points are document objects. In addition, a feature of the DOM event model is that (text nodes can also trigger events, IE does not work)

4. Event handlers: Functions that are called in response to an event are called event handlers (known as event listeners in the DOM), and functions that respond to click time are called OnClick event handlers. In addition, there are two kinds of event handling methods: One is traditional event processing and the other is modern program processing method. And when you bind an event handler to an event property, you can only refer to the function name, followed by parentheses, if the parentheses mean that the function is immediately executed

5. Modern event handler assignment methods: Attachevent () and DetachEvent (), attachevent () are used to bind an event handler to an event. and DetachEvent () is the binding used to touch the event handler. Both methods have two parameters: the name of the event handler to be assigned, and the name of the function.

6. Properties and methods of the table, which are on the book.       I'm not going to list it. 7. Event Type: Mouse event: Trigger event keyboard event when user performs a task with mouse: User typing on keyboard triggers keyboard event HTML event: An HTML event is triggered when a browser window or a specific client server interaction changes.

JS Bubbling Event Node

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.