Event pageY and pageX : Event Properties « Event « JavaScript DHTML

Event pageY and pageX

function function1(myEvent) { 
   document.getElementById("myX").innerHTML = myEvent.pageX;
   document.getElementById("myY").innerHTML = myEvent.pageY; 
document.onmousemove = function1;
    <b>Page X Coordinate:</b> 
    <span id="myX">0</span>
    <b>Page Y Coordinate:</b> 
    <span id="myY">0</span>


Related examples in the same category

1.Event qualifier
2.Event saveType
3.Event nextPage
4.Event repeat
5.Event return Value
6.Event screenY, screenX
7.Event offsetY and offsetY
8.Event 'layerY'
9.Event 'layerX'
10.Event 'propertyName'
11.Event from Element
12.Event screenX
13.Event 'target' Example
14.Event 'srcUrn' Example
15.Event source element
16.Event to Element
17.Event type
18.Event y and x Property
19.'contentOverflow' Example
20.'cancelBubble' Example
21.Get event Phase: CAPTURING,BUBBLING