Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

onmousemove event

onmousemove event

Event Object Reference Event Object

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

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the onmousemove event


HTML tags that support this event:

The onmousemove attribute can be used on HTML elements, except: , ,
, , ,