<script language=javascript>
function autosize()
{
    while (document.body.clientHeight<document.body.scrollHeight)
        window.resizeBy(5,0);
}
</script>......
<body onload="setInterval(autosize,100)" ...>

解决方案 »

  1.   

    <body onload="setInterval('autosize()',100)" ...>
      

  2.   

    看错了,是长度啊,这样有没有用呢?
    <script language=javascript>
    function autosize()
    {
        while (document.body.clientHeight<document.body.scrollHeight)
            window.resizeBy(0,5);
        while (document.body.clientWidth<document.body.scrollWidth)
            window.resizeBy(5,0);
    }
    </script>......
    <body onload="setInterval(‘autosize()',100)" ...>