Properti layar pixelDepth
Definisi dan Penggunaan
properti pixelDepth mengembalikan warna resolusi tampilan layar (bit per pixel).
tatabahasa
screen.pixelDepth
Dukungan Browser
Internet Explorer 10, Firefox, Opera, Chrome, dan Safari dukungan browser pixelDepth properti.
Catatan: Internet Explorer 9 dan versi sebelumnya dari browser IE tidak mendukung properti pixelDepth.
Tip: colorDepth atribut dan atribut pixelDepth mencapai hal yang sama.Karena semua browser utama mendukung colorDepth, jadi gunakan properti itu. / P>
contoh
contoh
Mengembalikan resolusi warna layar Anda:
<Script>
document.write ( "Resolusi Warna:" + screen.pixelDepth);
</ Script>
document.write ( "Resolusi Warna:" + screen.pixelDepth);
</ Script>
Contoh output di atas:
Coba »
contoh yang lebih
Contoh ini berisi semua atribut layar.
layar obyek