Различие между onMouseOver и onMouseEnter

Поскольку вы используете new для создания экземпляра, он не будет удален по умолчанию.

27
задан Brian Tompsett - 汤莱恩 26 November 2019 в 22:18
поделиться

3 ответа

Both onmouseenter and onmouseover fire when the mouse enters the boundary of an element. However, onmouseenter doesn't fire again (does not bubble) if the mouse enters a child element within this first element.

40
ответ дан 28 November 2019 в 05:21
поделиться

Unlike the onmouseover event, the onmouseenter event does not bubble. In other words, the onmouseenter event does not fire when the user moves the mouse pointer over elements contained by the object, whereas onmouseover does fire.

I always use onmouseover. I use onmouseover in the same purpose (highlights a row).

3
ответ дан 28 November 2019 в 05:21
поделиться

Вы можете избавить себя от кода, просто добавив поддержку : hover для всех элементов в IE:
попробуйте csshover.htc

0
ответ дан 28 November 2019 в 05:21
поделиться
Другие вопросы по тегам:

Похожие вопросы: