screenY property (window)
Returns an integer value that indicates the vertical position of the top side of the browser window, relative to the top side of the screen.
If you need the position of the top side of the browser's client area, use the screenTop property.
The screenY and screenTop properties are equivalent in Google Chrome and Safari, they return the vertical position of the top side of the browser window.
- To get the left position of the browser window, use the screenX 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 y-coordinate of the top side, in pixels.
Default: this property has no default value.
Example HTML code 1:
This example illustrates the use of the screenY property:
Did you find this example helpful?
User Contributed Comments