Window screenY attribute
- Previous Page
- Next Page
- Go to the Previous Level Window Object
Definition and Usage
screenY
The attribute returns the y (vertical) coordinate of the window relative to the screen.
See also:
Example
Example 1
Open a new window with specified left and top positions and return its coordinates:
const myWin = window.open("", "", "left=700,top=350,width=200,height=100"); let x = myWin.screenX; let y = myWin.screenY;
Example 2
Open a new window and return its coordinates:
const myWin = window.open("", "", "width=200,height=100"); let x = myWin.screenX; let y = myWin.screenY;
Syntax
window.screenY
or:
screenY
Parameter
None.
Return Value
Type | Description |
---|---|
Number | The vertical distance of the window from the screen in pixels. |
Browser Support
All Browsers Support window.screenY
:
Chrome | IE | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
Chrome | IE | Edge | Firefox | Safari | Opera |
Support | 10-11 | Support | Support | Support | Support |
- Previous Page
- Next Page
- Go to the Previous Level Window Object