JavaScript » eventhandler » onMouseMove

onMouseMove = myJavaScriptCode

Event handler for no objects as default.

The onMouseMove event handler is used to execute specified Javascript code whenever the mouse is moved. onMouseMove uses the following properties of the Event object: Because MouseMove events occur so often, it is not a default event of any object. To use this event type wth an object you must explicitly set the object to capture MouseMove events.
type - indicates the type of event.
target - indicates the target object to which the event was sent.
layerX, layerY, pageX, pageY, screenX, screenY
   indicate the cursor location at the time of the MouseMove event.
which - 1 represents a left mouse click and 3 a right click.
modifiers - lists the modifier keys (shift, alt, ctrl, etc.) held down when the    MouseMove event occurs.

See Also: