Here's a picture explaining the difference between pageY
and clientY
.
Same for pageX
and clientX
, respectively.
pageX/Y
coordinates are relative to the top left corner of the whole rendered page (including parts hidden by scrolling),
while clientX/Y
coordinates are relative to the top left corner of the visible part of the page, "seen" through browser window.
You'll probably never need screenX/Y