Window screenY
Example 1
Open a new window with a specified left and top position, and return its coordinates:
const myWin = window.open("", "", "left=700,top=350,width=200,height=100");
let x = myWin.screenX;
let y = myWin.screenY;
Try it Yourself »
More examples below.
Description
The screenY
property returns the y (vertical) coordinate of a window,
relative to the screen.
Syntax
window.screenY
or just:
screenY
Parameters
NONE |
Return Value
Parameter | Description |
A number | The vertical distance of the window relative to the screen, in pixels |
More Examples
Open a new window and return its coordinates:
const myWin = window.open("", "", "width=200,height=100");
let x = myWin.screenX;
let y = myWin.screenY;
Try it Yourself »
Browser Support
window.screenY
is supported in all browsers:
Chrome | IE | Edge | Firefox | Safari | Opera |
Yes | 10-11 | Yes | Yes | Yes | Yes |
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.