Get the total height of your screen:
let height = screen.height;
Try it Yourself »
More "Try it Yourself" examples below.
The height
property returns the total height of the user's screen.
The height
property returns the height in pixels.
The height
property is read only.
Use the width property to get the total width of the user's screen.
screen.height
Type | Description |
A number | The total height of the user's screen in pixels. |
All screen properties:
let text = "Total width/height: " + screen.width + "*" + screen.height + "<br>" +
"Available width/height: " + screen.availWidth + "*" + screen.availHeight + "<br>" +
"Color depth: " + screen.colorDepth + "<br>" +
"Color resolution: " + screen.pixelDepth;
Try it Yourself »
screen.height
is supported in all browsers:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | Yes |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!