asp.net.ph

Skip Navigation Links

y Property

event Properties   DHTML Events


Returns the vertical position of the mouse when the event fires.

Syntax


HTML N/A
Script [ iY = ] event.y

Possible Values


iY Integer specifying the vertical coordinate of the mouse, in pixels.

The property is read-only with no default value.

Remarks

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.

Example

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">
Applies To

event



>

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note