HTML onmouseleave Event Attribute
HTML Event AttributeThis event attribute is supported by all modern browsers.
Description
The onmouseleave event attribute runs a script when the mouse pointer moves out of an element and all of its descendants.
Unlike onmouseout, mouseleave does not bubble and does not fire when the pointer moves from the element onto one of its children; it only fires when the pointer leaves the element's area completely. It is usually paired with onmouseenter.
For pens and touch as well as mice, use onpointerleave.
Syntax
<element onmouseleave="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 onmouseleave event attribute. Hover over a browser icon to see the version that first introduced support for this HTML event attribute.
This event attribute is supported by all modern browsers.
Desktop





Tablets & Mobile






-
Supported Unknown Not supported
Sponsors
Password Manager
PasswordPal stores your passwords and private notes behind encryption that happens in your browser.
Copy Paste List
Copy and paste or download lists in your preferred format, including plain text, PDF, or HTML.
Unicode Characters & Emojis
Search all Unicode characters and emojis plus other tools.
Check Shortened URLs
Expand shortened URLs to view the destination link.
Advertise Here
Advertise your company and products here!