English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Proprietà altezza dello schermo

Oggetto Screen JavaScript

heightProprietà di sola lettura che restituisce l'altezza totale dello schermo in pixel.

UsowidthProprietà che ottiene la larghezza totale dello schermo (in pixel).

Sintassi:

screen.height
var x = "Total Height: " + screen.height;
Prova a vedere‹/›

Compatibilità del browser

Tutti i browser supportano completamente la proprietà height:

Proprietà
height

Dettagli tecnici

Valore di ritorno:Un numero che rappresenta l'altezza totale dello schermo dell'utente in pixel

Altri esempi

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‹/›

Riferimenti correlati

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

Oggetto Screen JavaScript