event Properties DHTML Events
Returns the vertical position of the mouse when the event fires.
HTML |
N/A |
Script |
[ iY = ] event.y |
iY |
Integer specifying the vertical coordinate of the mouse, in pixels. |
The property is read-only with no default value.
If the mouse is outside the window at the time the event fires, this property returns -1.
If no object in the hierarchy has been positioned, the BODY element 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