JavaScript Reference/Javascript Properties/pageY

Материал из Web эксперт
Перейти к: навигация, поиск

"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