我的显示器设定的 分辨率是2048*1152的 可是为什么我用 screan.width得到的数据是1966×1106啊  请各位牛人指点

解决方案 »

  1.   

    本人也好奇,
    availHeight 获取系统屏幕的工作区域高度,排除 Microsoft® Windows® 任务栏。 
    availWidth 获取系统屏幕的工作区域宽度,排除 Windows 任务栏。 
    再复核一下值是否正确。
      

  2.   

    忘了说了 这个问题用firefox debug 就不会发生  是IE的问题?
      

  3.   

    function getScreenSize()
    {
        var theWidth,theHeight;
        if (window.innerWidth) 
        { 
        theWidth = window.innerWidth 
        theHeight = window.innerHeight 
        } 
        else if (document.compatMode=='CSS1Compat') 
        { 
        theWidth = document.documentElement.clientWidth 
        theHeight = document.documentElement.clientHeight 
        } 
        else if (document.body) 
        { 
        theWidth = document.body.clientWidth 
        theHeight = document.body.clientHeight 
        } 
        var result = [theWidth,theHeight];
        return result;
    }alert(getScreenSize()[0])//宽
    alert(getScreenSize()[1])//高
      

  4.   

    to:aspwebchh你这个是用来获取浏览器工作 区域的宽和高的。