检测有关客户机的屏幕的细节

  1. <html>
  2. <body>
  3. <script type="text/javascript">
  4. document.write("Screen resolution: ")
  5. document.write(screen.width + "*" + screen.height)
  6. document.write("<br />")
  7. document.write("Available view area: ")
  8. document.write(screen.availWidth + "*" + screen.availHeight)
  9. document.write("<br />")
  10. document.write("Color depth: ")
  11. document.write(screen.colorDepth)
  12. document.write("<br />")
  13. document.write("Buffer depth: ")
  14. document.write(screen.bufferDepth)
  15. document.write("<br />")
  16. document.write("DeviceXDPI: ")
  17. document.write(screen.deviceXDPI)
  18. document.write("<br />")
  19. document.write("DeviceYDPI: ")
  20. document.write(screen.deviceYDPI)
  21. document.write("<br />")
  22. document.write("LogicalXDPI: ")
  23. document.write(screen.logicalXDPI)
  24. document.write("<br />")
  25. document.write("LogicalYDPI: ")
  26. document.write(screen.logicalYDPI)
  27. document.write("<br />")
  28. document.write("FontSmoothingEnabled: ")
  29. document.write(screen.fontSmoothingEnabled)
  30. document.write("<br />")
  31. document.write("PixelDepth: ")
  32. document.write(screen.pixelDepth)
  33. document.write("<br />")
  34. document.write("UpdateInterval: ")
  35. document.write(screen.updateInterval)
  36. document.write("<br />")
  37. </script>
  38. </body>
  39. </html>