访问者屏幕:像素深度

  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4.  
  5. <p id="demo"></p>
  6.  
  7. <script>
  8. document.getElementById("demo").innerHTML =
  9. "屏幕像素深度是:" + screen.pixelDepth;
  10. </script>
  11.  
  12. </body>
  13. </html>