Window innerHeight property
- Previous Page getComputedStyle()
- Next Page innerWidth
- Go Up One Level Window Object
Definition and usage
innerHeight
The property returns the height of the window content area.
innerHeight
The property is read-only.
See also:
Example
Example 1
Get window height:
let height = window.innerHeight;
let height = innerHeight;
Example 2
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>";
Syntax
window.innerHeight
Or:
innerHeight
Return value
Type | Description |
---|---|
Number | The internal height of the browser window content area (in pixels). |
Browser support
All browsers support window.innerHeight
:
Chrome | IE | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
Chrome | IE | Edge | Firefox | Safari | Opera |
Support | 9-11 | Support | Support | Support | Support |
- Previous Page getComputedStyle()
- Next Page innerWidth
- Go Up One Level Window Object