HTML DOM deviceXDPI 属性

定义和用法

deviceXDPI 属性返回显示屏幕的每英寸水平点数。

语法

  1. screen.deviceXDPI

实例

  1. <html>
  2.  
  3. <body>
  4. <script type="text/javascript">
  5. document.write("<p>Device XDPI: ")
  6. document.write(screen.deviceXDPI + "</p>")
  7. </script>
  8. </body>
  9.  
  10. </html>