JavaScript Kit > DOM Reference > Here
DOM Window Object properties
Last updated: Februrary 27th, 2006
Window object methods
Methods | Description |
---|---|
innerWidth, innerHeight | Read/write property that specifies the width and
height, in pixels, of the window's content area respectively. Does
not include the toolbar, scrollbars etc. NS/Firefox
exclusive properties. Note: IE equivalents are "document.body.clientWidth" and "document.body.clientHeight" |
length | Returns the number of frames contained in the window. |
outerWidth, outerHeight | Read/write property that specifies the total width and height, in pixels, of the window's content area respectively, including any toolbar, scrollbars etc. NS/Firefox exclusive properties with no IE4+ equivalent. |
pageXOffset, pageYOffset | Returns an integer representing the pixels the
current document has been scrolled from the upper left corner of the
window, horizontally and vertically, respectively. Typically used to
provide the
needed
calculations to keep an element in view even when the page is
scrolled. NS/Firefox
exclusive properties. Note: IE equivalents are "document.body.scrollLeft" and "document.body.scrollTop" |
window.screen | References the screen object, which provides information about the user's screen/ monitor. |
screen.availWidth | Returns the height of the screen, in pixels, minus interface features such as the taskbar in Windows. In other words, the usable height available to your browser window. |
screen.availHeight | Returns the width of the screen, in pixels, minus interface features such as the taskbar in Windows. In other words, the usable width available to your browser window. |
screen.colorDepth | The bit depth of the color palette available for displaying images in bits per pixel. |
screen.height | The total height of the screen, in pixels. |
screen.pixelDepth | Display screen color resolution (bits per pixel). NS/Firefox exclusive property. |
screen.width | The total width of the screen, in pixels. |
screenX, screenY | Read/write property that specifies the x and y coordinates of the window relative to the user's monitor screen. NS/Firefox exclusive properties. |
screenLeft, screenTop | Specifies the x and y coordinates of the window relative to the user's monitor screen. IE only. |
scrollX, scrollY | Returns an integer representing the pixels the current document has been scrolled from the upper left corner of the window, horizontally and vertically, respectively. NS/Firefox exclusive properties. Equivalent to pageXOffset and pageYOffset, and in IE, "document.body.scrollLeft" and "document.body.scrollTop" |
Note: See also JavaScript window object.
Sponsored By
DD CSS Library
Free CSS menus and codes to give your site a visual boost.
DOM Window
DOM Document
DOM Element
DOM Event
DOM Style
DOM Table
Miscellaneous