HTML onmouseenter Event Attribute
Description
The onmouseenter event attribute runs a script when the mouse pointer moves onto an element.
It is similar to onmouseover, with two important differences: mouseenter does not bubble, and it does not fire again when the pointer moves between the element and its children. mouseover fires each time the pointer enters the element or any of its descendants. This makes onmouseenter, together with onmouseleave, the simpler choice for hover effects on elements that contain other elements.
For a pure visual effect, the CSS :hover pseudo-class is usually enough. For pens and touch as well as mice, use onpointerenter.
Syntax
<element onmouseenter="script">
Values
- scriptThe name of the script to use when the event has been triggered.
Example
Browser Support
The following information will show you the current browser support for the HTML onmouseenter event attribute. Hover over a browser icon to see the version that first introduced support for this HTML event attribute.
Desktop





Tablets & Mobile





