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.