是当前页面?还是其它页面?
当前页面
document.documentElement.offsetWidth;
document.documentElement.offsetHeight;
其它页面
window.frames["frameName"].document.documentElement.offsetWidth;

解决方案 »

  1.   

    呵呵
    谢谢了
    iWidth=document.body.clientHeight;
    iHeight=document.body.clientWidth;
    本来我想用这个得到本窗口的宽度和高度,可是得到的值却为height:0   width:200
    好象body并没有扩满窗口
    所以我只好用他所在的框架来得到窗口的高度和宽度
    该如何得到呢?
      

  2.   

    我在这个窗口里有个table,想让这个table的宽度和高度和这个窗口一样,也就是让table来占满正个窗口,所以想把窗体的宽度和高度赋给table的宽和高,上面的代码就是获取窗口的高度和宽度,可是却没有得到
      

  3.   

    当前窗口用document.body.scrollHeight可以啊。不行的话贴代码。
      

  4.   

    这是我的代码
    function initBody()
    {
    alert("height:"+document.body.scrollHeight+"         width:"+document.body.clientWidth);
    }
    </script>
    </head><body leftmargin="10"  topmargin="0"  onLoad="initBody()">
      

  5.   

    我运行了你的代码,得到height:24 width:770
      

  6.   

    我的ie也是6.0,整个代码就这么多:
    <script>
    function initBody()
    {
    alert("height:"+document.body.scrollHeight+"         width:"+document.body.clientWidth);
    }
    </script>
    </head><body leftmargin="10"  topmargin="0"  onLoad="initBody()">
      

  7.   

    谢谢大家
    我已经解决了
    需要在body里设置好他的长和宽为百分百
    <body rightmargin="10" style="width:100%;height:100%; " topmargin="0"  >