X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR BOOTSTRAP XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

Window screenX and screenY Properties

Window Object Reference Window Object

Example

Return the x and y coordinates of the new window relative to the screen:

var myWindow = window.open("", "myWin");
myWindow.document.write("<p>This is 'myWin'");
myWindow.document.write("<br>ScreenX: " + myWindow.screenX);
myWindow.document.write("<br>ScreenY: " + myWindow.screenY + "</p>");

Try it yourself »


Definition and Usage

The screenX and screenY properties returns the x (horizontal) and y (vertical) coordinates of the window relative to the screen.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The screenX and screenY properties are supported in all major browsers, except Internet Explorer before version 9.


Syntax

window.screenX
window.screenY

Technical Details

Return Value: The horizontal and vertical distance of the window relative to the screen


Window Object Reference Window Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook