onmousemove event
Example
Execute JavaScript code after the mouse pointer moves to the specified element:
Move the mouse pointer here.
Try it »
Definition and Usage
The onmousemove event occurs when the mouse pointer moves to the specified object.
Syntax
In HTML:
<
element
onmousemove="
SomeJavaScriptCode
">In JavaScript:
object
.onmousemove=function(){
SomeJavaScriptCode
};
| Parameters | Description |
|---|---|
| SomeJavaScriptCode | Required. Specifies the JavaScript to be executed when the event occurs. |
Browser support





All major browsers support the onmousemove event
HTML tags that support this event:
The onmousemove attribute can be used on HTML elements, except:
, , ,
Event Object