innerHeight property (window)
Returns the height of the browser's client area, including the horizontal scrollbar, if rendered.
Note: The innerHeight property is supported in Internet Explorer from version 9.The innerHeight property is rarely useful, because scrollbars are not part of the document working area. Use the cross-browser clientHeight property of the html element instead. It returns the height of the browser's client area without the horizontal scrollbar.
- You can get the width of the client area, including the vertical scrollbar with the innerWidth property.
- You can get the width of the client area, excluding the vertical scrollbar with the clientWidth property.
- The top-left corner of the client area relative to the top-left corner of the screen can be retrieved with the screenLeft and screenTop properties.
- If you need the total height of the browser window, use the outerHeight property.
- If you need information about the dimensions of the screen, use the screen object.
- To get the height of the document or an element in the document, please see the pages for the clientHeight, offsetHeight and scrollHeight properties.
You can find the related objects in the Supported by objects section below.
This property is read/write.
Integer that represents the height, in pixels.
Default: this property has no default value.
Example HTML code 1:
This example illustrates the use of the innerHeight property:
Did you find this example helpful?
User Contributed Comments