Get the browser window's height and width:
let height = window.outerHeight;
Try it Yourself »
let height = outerHeight;
Try it Yourself »
More examples below.
TheouterHeight
property returns the outer height of the browser window, including all interface elements (like toolbars/scrollbars).
TheouterHeight
property is read only.
window.outerHeight
outerHeight
Type | Description |
A number | The height of the browser's window, including all interface elements, in pixels. |
All height and width properties:
let text =
"<p>innerWidth: " + window.innerWidth + "</p>" +
"<p>innerHeight: " + window.innerHeight + "</p>" +
"<p>outerWidth: " + window.outerWidth + "</p>" +
"<p>outerHeight: " + window.outerHeight + "</p>";
Try it Yourself »
window.outerHeight
is supported in all browsers:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | 9-11 |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!