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