English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
LepixelDepthAttribut lecture seule qui renvoie la profondeur de pixel de l'écran.
La profondeur de pixel est le nombre de bits utilisés par chaque pixel par le matériel d'affichage du système.
screen.pixelDepth
var x = "Profondeur de pixel : " + screen.pixelDepth;Vérifiez ici‹/›
Tous les navigateurs prennent en charge pleinement l'attribut pixelDepth :
Attribut | |||||
pixelDepth | Est | Est | Est | Est | Est |
Valeur de retour : | Un nombre, représentant la résolution de couleur, par pixel. Valeurs possibles :
|
---|
Ce exemple affiche toutes les propriétés d'écran :
var txt = ""; txt += "<p>Largeur totale/height: " + screen.width + "*" + screen.height + "</p>"; txt += "<p>Largeur disponible/height: " + screen.availWidth + "*" + screen.availHeight +"</p>"; txt += "<p>Profondeur de couleur : " + screen.colorDepth + "</p>"; txt += "<p>Resolution de couleur : " + screen.pixelDepth + "</p>"; document.write(txt);Vérifiez ici‹/›
Référence screen :Propriété screen.availHeight
Référence screen :Propriété screen.availWidth
Référence screen :Propriété screen.height
Référence screen :Propriété screen.width
Référence screen :Propriété screen.colorDepth