Name
HTMLElement.onmousemove: event handler invoked when the mouse moves within an element — DOM Level 0
Synopsis
Function onmousemove
Description
The onmousemove property of
an HTMLElement object specifies an event-handler function that is
invoked when the user moves the mouse pointer within the
element.
If you define an onmousemove event handler, mouse motion
events are generated and reported in huge quantities when the mouse
is moved within element. Keep this in
mind when writing the function to be invoked by the event handler.
If you are interested in tracking mouse drags, register a handler of
this type in response to a mousedown event and then deregister it
when the mouseup event arrives.
See Also
Element.addEventListener(
), Event, MouseEvent; Chapter 17
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access