screen.width/height give wrong info about screen resolution
问题 My screen have resolution 1200 x 800 but this script give me 1429 x 893 <script> if (screen) { var str = "Screen width:" + screen.width + "\n" + "Screen height:" + screen.height; alert(str); } </script> Why it doesn't work? p.s. On other site this code screen.width + screen.height but when run it on localhost it give wrong info. 回答1: From MDN : Internet Explorer will take into account the zoom setting when reporting the screen width. It will only return the real width of the screen if the