Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Window screenX and screenY properties

Window screenX and screenY properties

Window Object Reference Window Object


Definition and Usage

The screenX and screenY properties return the X and Y coordinates of the window relative to the screen.

Syntax

window.screenX

window.screenY


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the screenX and screenY properties, except Internet Explorer.

Note: For the IE browser, use. "window.screenLeft" and "window.screenTop" to get the same value


Example

Example

Return the X and Y coordinates of the new window relative to the screen:

Try it »


Window Object Reference Window Object