HTML onmousemove Event Attribute HTML Reference


Execute a JavaScript when moving the mouse pointer over an image:

<img onmousemove="bigImg(this)" src="smiley.gif" alt="Smiley">

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

1. Definition and Usage

The onmousemove attribute fires when the mouse pointer moves over an element.

Note: The onmousemove attribute CANNOT be used with: <base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, or <title>.

2. Differences Between HTML 4.01 and HTML5


3. Syntax

<element onmousemove="script">

4. Attribute Values

scriptThe script to be run on onmousemove

Relative articles