DOM:event.clientY
From MDC
Contents |
[edit] Summary
Returns the vertical coordinate within the application's client area at which the event occurred (as opposed to the coordinates within the page). For example, clicking in the top-left corner of the client area will always result in a mouse event with a clientY value of 0, regardless of whether the page is scrolled vertically.
[edit] Syntax
y = event.clientY
[edit] Example
<html>
<head>
<title>clientX\clientY example</title>
<script type="text/javascript">
function showCoords(evt){
alert(
"clientX value: " + evt.clientX + "\n"
+ "clientY value: " + evt.clientY + "\n"
);
}
</script>
</head>
<body onmousedown="showCoords(event)">
<p>To display the mouse coordinates click anywhere on the page.</p>
</body>
</html>
[edit] Notes
See also clientX, screenX, and screenY.