JavaScript Window Object Properties


Example

The Window Object contains the following properties.

PropertyDescription
window.closedWhether the window has been closed
window.lengthNumber of <iframe> elements in window
window.nameGets or sets the name of the window
window.innerHeightHeight of window
window.innerWidthWidth of window
window.screenXX-coordinate of pointer, relative to top left corner of screen
window.screenYY-coordinate of pointer, relative to top left corner of screen
window.locationCurrent URL of window object (or local file path)
window.historyReference to history object for browser window or tab.
window.screenReference to screen object
window.pageXOffsetDistance document has been scrolled horizontally
window.pageYOffsetDistance document has been scrolled vertically