HTML onmouseout Attribute
Definition and Usage
The onmouseout attribute fires when the mouse pointer moves out of an element.
Tip: The onmouseout attribute is often used together with the onmouseover attribute.
Applies to
The onmouseout attribute is part of the Event Attributes, and can be used on any HTML elements.
| Elements | Event |
|---|---|
| All HTML elements | onmouseout |
Example
Img Example
Execute a JavaScript when moving the mouse pointer out of an image:
<img onmouseout="normalImg(this)" src="smiley.gif" alt="Smiley">
Try it Yourself »
Browser Support
| Event Attribute | |||||
|---|---|---|---|---|---|
| onmouseout | Yes | Yes | Yes | Yes | Yes |