What is the difference between pageX/Y clientX/Y screenX/Y in Javascript? [duplicate]

The visual cues represents:

yellow Screen → the full screen of the monitor (screenX/Y)
Position will always be relative to the physical screen’s viewport.

Blue Client → the client viewport of the browser (clientX/Y)
If you click in the left top corner the value will always be (0,0) independent on scroll position.

Red Document → the complete document/page (pageX/Y)
Note that pageX/pageY on the UIEvent object are not standardized.

All values are in pixels.

screen snapshot with extended page illustration

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)