Differences between JavaScript mouseenter and mouseover

Time:2020-12-2

Triggered when the mouse moves over the elementmouseenterevent,
similarmouseoverThe differences between them are as follows:

mouseover:

  1. When the mouse passes through its own box, it will trigger when it passes through the sub box (becauseThere is bubbling

mouseenter:

  1. It will only trigger through its own box(It doesn’t bubble
  2. FollowmouseenterCorrespondingly, the mouse leaves the eventmouseleavesameIt doesn’t bubble