![]() |
![]() |
![]() |
![]() |
Width of the browser window viewport including, if rendered, the vertical scrollbar.
var intViewportWidth = window.innerWidth;
The window.innerWidth property is read-only; it has no default value.
window.innerWidth property stores an integer representing a number of pixels.
The innerWidth property will be supported in any window object like a window, a frame, a frameset or a secondary window.
Assuming a frameset ------------------- var intFrameWidth = window.innerWidth;// or var intFrameWidth = self.innerWidth;// will return the width of the frame viewport within the frameset var intFramesetWidth = parent.innerWidth;// will return the width of the viewport of the closest frameset var intOuterFramesetWidth = top.innerWidth;// will return the width of the viewport of the outermost frameset
See also window.outerWidth window.innerHeight, window.outerHeight.
DOM Level 0. Not part of any W3C technical specification or recommendation.
![]() |
![]() |
![]() |
![]() |