JavaScript Reference/Javascript Properties/bufferDepth
Содержание
"bufferDepth" Example
<source lang="javascript">
<html> <head> <script language="JavaScript">
function function1() { if (navigator.appName.indexOf("Microsoft") != -1) { alert("The buffering for this screen is "+screen.bufferDepth); } else { alert(" no default for buffering depth"); } } function function2() { screen.bufferDepth = -1; alert("The buffering depth for this screen has been changed to "+screen.bufferDepth); }
</script> </head> <body> <input type="button" value="No Buffering" onClick="function1();"> <input type="button" value="Same as Color Depth" onClick="function2();"> </body> </html>
</source>
"bufferDepth" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To |screen | +----------------+--------------------------------------------------------------+
</source>
"bufferDepth" Possible Values
<source lang="javascript">
Possible Values 0 the default; no buffering occurs -1 buffering occurs at screen depth; this is the optimum value), 1, 4, 8, 15, 16, 24, 32 buffering occurs at the specified color depth
</source>
"bufferDepth" Syntax and Note
<source lang="javascript">
Note: Read and write property. Controls the color depth of the screen buffer. Specified in bits per pixel.
Syntax:
screen.bufferDepth = value
</source>