Event.MOUSEMOVE

JavaScript 1.2+, JScript 3.0+ Nav4+, IE 4+ Syntax

Event.MOUSEMOVE

Description

The MOUSEMOVE property of the Event object indicates when the mouse cursor is moved by the user.

Example

Listing 7.230 shows how the MOUSEMOVE event is used to determine when the user is moving the mouse. As the mouse cursor is moved, the coordinates are displayed in the text boxes.

Listing 7.230 Accessing the MOUSEMOVE Property
 <html> <head> <title>Using Event.MOUSEMOVE</title> </head> <body> <script language = "JavaScript"> <!--Hide // sets up the window to capture MOUSEMOVE events window.captureEvents(Event.MOUSEMOVE); // function that handles the specific event. The evnt parameter refers to // the event object. The function sets the x ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.