var i, doc_width = 800, doc_height = 600;这句话不是给它限制了范围吗?
改改试试吧
代码太长了
我看不来!~!!~

解决方案 »

  1.   

    var i, doc_width = 800, doc_height = 600;800*600的显示器...要换成1024的只要改上面两个参数就可以了..
      

  2.   

    不行啊~~我是一点也不懂JAVASCRIPT,这段代码也是从网上找的,我刚刚粗粗看了一下,觉得问题出在这两行:
    doc_width = document.body.clientWidth;
    doc_height = document.body.clientHeight
    不知道对不对~~如果是这样,那一个页面总的高度应该怎么表示呢?~~(就像这个贴子,从顶端到底部的Height应该怎么表示?)
      

  3.   

    不对不对,我现在只能看得懂里面表示宽度的语句,其他的一窍不通,表示宽度的语句应该有两段:var ns4up = (document.layers) ? 1 : 0;
    var ie4up = (document.all) ? 1 : 0;
    ……
    if (ns4up) {
    doc_width = self.innerWidth;
    doc_height = self.innerHeight;
    } else if (ie4up) {
    doc_width = document.body.clientWidth;
    doc_height = document.body.clientHeight;
    }flag[i]=(Math.random()<0.5)?1:0;
    doc_width = document.body.clientWidth;
    doc_height = document.body.clientHeight;
    }其他的我就看不懂了,我现在不能再回复了,烦请哪位大哥再帮帮忙啊!最好能看完代码,应该不是很难的~~至少像我这样的VB初学者都可以看懂一点,帮帮忙吧~~~~不会真的要我去学JAVASCRIPT吧?~~