English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
heightProprietà di sola lettura che restituisce l'altezza totale dello schermo in pixel.
UsowidthProprietà che ottiene la larghezza totale dello schermo (in pixel).
screen.height
var x = "Total Height: " + screen.height;Prova a vedere‹/›
Tutti i browser supportano completamente la proprietà height:
Proprietà | |||||
height | Sì | Sì | Sì | Sì | Sì |
Valore di ritorno: | Un numero che rappresenta l'altezza totale dello schermo dell'utente in pixel |
---|
Questo esempio mostra tutte le proprietà dello schermo:
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);Prova a vedere‹/›
Riferimento screen:Proprietà screen.availHeight
Riferimento screen:Proprietà screen.availWidth
Riferimento screen:Proprietà screen.colorDepth
Riferimento screen:Proprietà screen.width
Riferimento screen:Proprietà screen.pixelDepth