Window screenTop property

Definition and usage

screenTop The property returns the y (vertical) position of the window relative to the screen.

See also:

screenLeft property

screenX property

screenY property

Example

Return the x and y coordinates of the window:

let x = window.screenLeft;
let y = window.screenTop;

Try it yourself

Syntax

window.screenTop

Return value

Type Description
Number Window relative to the screen yPosition (vertical) in pixels.

Browser support

All browsers support window.screenTop

Chrome IE Edge Firefox Safari Opera
Chrome IE Edge Firefox Safari Opera
Understøttet 11 Understøttet Understøttet Understøttet Understøttet

window.screenTop Ikke understøttet i Firefox før version 64 (november 2018).