JavaScript Reference/Javascript Properties/pageY — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 08:22, 26 мая 2010
"pageY" Example
<html>
<body>
<script>
function function1(myEvent) {
document.getElementById("myX").innerHTML = myEvent.pageX;
document.getElementById("myY").innerHTML = myEvent.pageY;
}
document.onmousemove = function1;
</script>
<p><b>Page X Coordinate:</b> <span id="myX">0</span></p>
<p><b>Page Y Coordinate:</b> <span id="myY">0</span></p>
</body>
</html>
"pageY" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |event |
+----------------+--------------------------------------------------------------+
"pageY" Syntax and Note
Note:
Read-only property.
Sets the Y coordinate in pixels of the cursor position relative to the page.
Syntax:
event.pageY
eventName.pageY