How to detect the screen DPI using JavaScript

前端 未结 3 520
余生分开走
余生分开走 2020-12-03 07:54

The only way I found till now, is getting the offsetWidth, offsetHeight of a test div element with height and width of one inch: http:

3条回答
  •  不知归路
    2020-12-03 08:01

    Then you can use JQuery to send dpi_x and dpi_y this to to your server

    http://jsfiddle.net/sxfv3/

提交回复
热议问题