Window outerWidth property
- Föregående sida outerHeight
- Nästa sida pageXOffset
- Gå tillbaka till föregående nivå Window-objekt
Definition and usage
outerWidth
The property returns the external width of the browser window, including all interface elements (such as toolbars/scrollbars).
outerWidth
The property is read-only.
See also:
Example
Example 1
Get the height and width of the browser window:
let width = window.outerWidth;
let width = outerWidth;
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.outerWidth
Or:
outerWidth
Return value
Type | Description |
---|---|
Number | The width of the browser window, including all interface elements, is measured in pixels. |
Browser support
All web browsers support window.outerWidth
:
Chrome | IE | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
Chrome | IE | Edge | Firefox | Safari | Opera |
Stöd | 9-11 | Stöd | Stöd | Stöd | Stöd |
- Föregående sida outerHeight
- Nästa sida pageXOffset
- Gå tillbaka till föregående nivå Window-objekt