y property
[This documentation is preliminary and is subject to change.]
Sets or retrieves the y-coordinate (in pixels) of the mouse pointer, or user's finger, offset from the closest relatively positioned parent element of the element that fired the event.
Syntax
HRESULT value = object.put_y( v);HRESULT value = object.get_y(* p);
Property values
Type: long
the y-coordinate, in pixels.
Remarks
The property is read-only in Microsoft Internet Explorer 4.0, and read/write in Microsoft Internet Explorer 5 and later. In browser versions earlier than Internet Explorer 5, the y property retrieves a coordinate relative to the client.
If the event firing element is relatively positioned, then the y-coordinate from the boundary of the element is returned. If the event firing element and all of its parent elements are not relatively positioned, then the y property returns a coordinate relative to the body element.
The y property returns a coordinate relative to the body element.
If the mouse or finger is outside the window at the time the event fires, this property returns -1.
Send comments about this topic to Microsoft
Build date: 6/12/2012