asp.net.ph

Skip Navigation Links

onmousemove Event


Fires when the user moves the mouse over the object.

Syntax

Inline <element onmousemove = "handler" ... >
Script object.onmousemove = handler

Remarks

Bubbles Yes
Cancels No
To invoke Move the mouse over the document.
Default action Initiates any action associated with this event.

A mousemove event occurs when the pointing device is moved while it is over an element.

This event is valid for most elements.

Event Object Properties

While event handlers in the Document Object Model do not receive parameters directly, the handler can query the event object for data.

Event Object Properties


Example

The following sample demonstrates the use of the onmousemove event to monitor the location of the mouse cursor on the screen.

When the mouse cursor moves over the DIV object, a SPAN object is updated with the clientX and clientY property values. The clientX and clientY properties are exposed by the event object.

Sample Code


See Also

onmousedown, onmouseout, onmouseover, onmouseup


Need a break ?
Suggested Reading

Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph.

If you have any question, comment or suggestion,
please send us a note