English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
该pixelDepth読み取り専用の属性で、スクリーンのピクセル深度を返します。
ピクセル深度は、システムの表示ハードウェアが各ピクセルで使用するビット数です。
screen.pixelDepth
var x = "Pixel Depth: " + screen.pixelDepth;テストを見て‹/›
すべてのブラウザが完全にサポートするpixelDepth属性:
属性 | |||||
pixelDepth | は | は | は | は | は |
返り値: | 色の解像度を示す数字で、各ピクセル単位で指定されます。 可能な値:
|
---|
この例では、すべてのスクリーン属性を表示しています:
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);テストを見て‹/›
screenリファレンス:screen.availHeight属性
screenリファレンス:screen.availWidth属性
screenリファレンス:screen.height属性
screenリファレンス:screen.width属性
screenリファレンス:screen.colorDepth属性