Home > Web Front-end > JS Tutorial > body text

javascript event problem_javascript skills

WBOY
Release: 2016-05-16 18:47:09
Original
846 people have browsed it
Copy code The code is as follows:


Hello


1. When the mouse is placed on , only alert('world') and alert('hello') will be executed in sequence. It can be seen that the event response The function is executed in the bubbling phase, that is, for DOM-compatible browsers, it is not executed in the capturing phase. Therefore, the event response function written in HTML will only be executed during the bubbling stage.
2. When the mouse is moved from the div to the span, alert('out_div'), alert('world'), and alert('hello') will be executed in sequence. This shows that although the span is in the div, But when you move the mouse from the div to the span, it is also regarded as moving the mouse out of the div.
Related labels:
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!