This sample demonstrates the use of the onmousemove event to monitor the location of the mouse cursor in a specified region of the page. When the mouse is moved over the gray div, the yellow span is updated with the mouse location values obtained from the clientX and clientY properties on the event object.
[Right-click and choose View Source from the shortcut menu.]
© 2007 Microsoft Corporation. All rights reserved. Terms of use.