Window innerWidth and innerHeight property
Definition and Usage
innerheight return to the document window displays the height of the area.
innerwidth return to the document window displays the width of the area.
Note: Use outerWidth and outerHeight Property Gets plus toolbars and scroll bars of the window width and height.
grammar
Get:
window.innerWidth
window.innerHeight
window.innerHeight
Setting:
window.innerWidth=pixels
window.innerHeight=pixels
window.innerHeight=pixels
Browser Support
All major browsers support innerWidth and innerHeight properties.
Note: IE 8 and earlier versions of IE do not support these two properties.
Examples
Examples
Gets the height and width of the window (does not include toolbars and scroll bars):
var w=window.innerWidth;
var h=window.innerHeight;
var h=window.innerHeight;
try it"
Window object