English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
outerHeightA read-only property that returns the height of the entire browser window (including the scroll bar) in pixels.
UsageinnerHeightProperty to get the height of the currently displayed page.
window.outerHeight
var h = window.outerHeight; var w = window.outerWidth;Test and See‹/›
The numbers in the table specify the first browser version that fully supports the outerHeight property:
Property | |||||
outerHeight | 1 | 1 | 9 | 3 | 9 |
Return Value: | A number representing the height of the browser window, including the scroll bar |
---|
This example shows innerWidth, innerHeight, outerWidth, and outerHeight in one example:
var txt = ""; txt += "<p>innerWidth: " + window.innerWidth + "</p>"; txt += "<p>innerHeight: " + window.innerHeight + "</p>"; txt += "<p>outerWidth: " + window.outerWidth + "</p>"; txt += "<p>outerHeight: " + window.outerHeight + "</p>"; document.write(txt);Test and See‹/›
Reference: Window (Window)window.innerHeight property
Reference: Window (Window)window.innerWidth property
Reference: Window (Window)window.outerWidth property