Gets or sets the y-coordinate of the mouse pointer, or user's finger, position relative to the client area of the window, excluding window decorations and scroll bars.
Syntax
[ iYPos = ] object.clientY
Possible Values
iYPos Integer that specifies or receives the y-coordinate, in pixels. The property is read/write. The property has no default value.
DHTML expressions can be used in place of the preceding value(s). As of Internet Explorer 8, expressions are supported in IE7 Standards mode and IE5 (Quirks) mode only. For more information, see About Dynamic Properties and Defining Document Compatibility.
Remarks
The property is read-only in Microsoft Internet Explorer 4.0, and read/write in Internet Explorer 5 and later.
Because the clientY property returns a value relative to the client, you can add the value of the scrollTop property to determine the distance of the y-coordinate from the edge of the body element.
Within a viewlink, the client area begins at the edge of the master element.
Example
This example uses the clientY property to determine the mouse position relative to the window. The status window shows the mouse position at all times.
<SCRIPT> function clientCoords() { var offsetInfo = "" clientInfo = "The x coordinate is: " + window.event.clientX + "\r" clientInfo += "The y coordinate is: " + window.event.clientY + "\r" alert(clientInfo); } </SCRIPT> </HEAD> <BODY onmousemove="window.status = 'X=' + this.clientX + ' Y=' + this.clientY" ondblclick="clientCoords()">Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/clientY.htm
Standards Information
There is no public standard that applies to this property.
Applies To
event, Event Constructor