Javascript event question _ javascript skills

Source: Internet
Author: User
We all know that in the DOM event model, there are two stages: capture and bubbling, while in the IE event model, there is only the bubble stage. The Event Response Function written in html is executed only in the bubble stage. The Code is as follows:



Hi!



1. When you place the cursor over it, alert ('World') and alert ('hello') are executed in sequence. We can see that the event response function is executed in the bubble stage, that is, DOM-compatible browsers are not executed during the capture phase. Therefore, the Event Response Function written in html is executed only in the bubble stage.
2. When you move the mouse over p to span, alert ('out _ p'), alert ('World'), alert ('hello'), and '), this indicates that although span is in p, when you move the mouse from p to span, it is also to move the mouse out of p.

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.