JavaScript Reference/Javascript Properties/colorDepth
Содержание
"colorDepth" Example
<html>
<head>
<script language="JavaScript">
function function1() {
var m = screen.colorDepth;
alert("The color depth of the screen is "+m+" bits per pixel");
}
</script>
</head>
<body bgcolor="#EEEEEE" ondblclick="function1();">
</body>
</html>
"colorDepth" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |screen |
+----------------+--------------------------------------------------------------+
"colorDepth" Possible Values
Possible Values
An integer representing the number of bits per pixel: 1, 4, 8, 15, 16, 24, or 32.
"colorDepth" Syntax and Note
Note:
Read-only property.
Returns the screen color depth.
Syntax:
screen.colorDepth