DHTML Events
Returns the horizontal position of the mouse when the event fires.
HTML |
N/A |
Script |
[ iX = ] event.x |
iX |
Integer specifying the horizontal coordinate of the mouse, in pixels. |
The property is read-only with no default value.
If the mouse is outside the window when the event is called, this property returns -1.
If no object in the hierarchy has been positioned, the BODY object is the default.
The following example displays the current mouse position in the browser's status window.
<body onmousemove="window.status "X=' +
window.event.x + ' Y=' + window.event.y">
event