screenX property (window)
Returns an integer value that indicates the horizontal position of the left side of the browser window, relative to the left side of the screen.
If you need the position of the left side of the browser's client area, use the screenLeft property.The screenX and screenLeft properties are equivalent in Google Chrome and Safari, they return the horizontal position of the left side of the browser window.
- To get the top position of the browser window, use the screenY property.
- If you need the size of the browser window, see the pages for the outerHeight and outerWidth properties.
- The browser window can be resized with the resizeBy and resizeTo methods,
- and can be moved with the moveBy and moveTo methods.
You can find the related objects in the Supported by objects section below.
This property is read-only.
Integer that represents the x-coordinate of the left side, in pixels.
Default: this property has no default value.
Example HTML code 1:
This example illustrates the use of the screenX property:
Did you find this example helpful?
Supported by objects:
User Contributed Comments