pageX and pageY properties for events:
In the following example we move the mouse inside a square conditioned with css styles. With the function mousemove we detect the movement of the mouse with pageX and pageY we detect the position of the event.
With the function click, when clicking with the mouse inside we add with the function append the position of the mouse in that instant, using pageX and pageY we detect the position of the event. mouse at that moment, using pageX and pageY.
Interesting Articles