English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
heightA read-only property returns the total height of the screen in pixels.
UsewidthProperty to get the total width of the screen (in pixels).
screen.height
var x = "Total Height: " + screen.height;Test and see‹/›
All browsers fully support the height property:
property | |||||
height | is | is | is | is | is |
Return value: | A number representing the total height of the user's screen, in pixels |
---|
This example displays all screen properties:
var txt = ""; txt += "<p>Total width/height: " + screen.width + "*" + screen.height + "</p>"; txt += "<p>Available width/height: " + screen.availWidth + "*" + screen.availHeight +"</p>"; txt += "<p>Color depth: " + screen.colorDepth + "</p>"; txt += "<p>Color resolution: " + screen.pixelDepth + "</p>"; document.write(txt);Test and see‹/›
screen reference:screen.availHeight property
screen reference:screen.availWidth property
screen reference:screen.colorDepth property
screen reference:screen.width property
screen reference:screen.pixelDepth property