screen->width
最好用table控制页面布局

解决方案 »

  1.   

    screen->width那是取得分辨率的啊,比如1024,800什么的,是死的呀,我要的是浏览器实实在在的宽度
      

  2.   

    document.body.scrollWidth也不对,取得的总是1024,就是screen.width的值,
      

  3.   

    body.clientWidth
    body.offsetWidth
      

  4.   

    应该是:
    document.body.clientWidth;
    document.body.offsetWidth;
      

  5.   

    对,就是
    document.body.offsetWidth
    document.body.clientWidth
    但是不知道什么时候document.body.offsetWidth<>document.body.clientWidth    ????? yonghengdizhen(秋叶映红了天) 的document.body.scrollWidth也不总是screen.width,上面是我测试错了,但是决不能正确取得窗口的实际宽度.那是内容的横向宽度,不如一个图片有531px,当窗口小于531时,document.body.scrollWidth也总是531
      

  6.   

    body也有border属性!可以设置其宽度!offsetWidth包括border.
    而clientWidth不包括border.