bottom.document.body.scrollWidth
bottom.document.body.scrollHeight判断以上两个值

解决方案 »

  1.   

    iframe width="100%" name="bottom" hspace="4" vspace="4" frameBorder="4" marginheight="0" marginwidth="0" id="bottom" src="" style="height:expression(1); aho:expression(autoResize());" ></iframe>function autoResize() {
       try
       {
        document.all["bottom"].style.height=bottom.document.body.scrollHeight;
       }
       catch(e)
       { }
    }
    这个虽然可以自动增大减小,但是我想让其减小的时候,小到一定高度,比如600.
      

  2.   

    demo.htm<iframe src="in.htm" name="in" border="0" frameborder=0></iframe>in.htm 加入..<script language="Javascript"> 
    function window.onload() 

    parent.document.all("in").style.height=document.body.scrollHeight+15; 
    parent.document.all("in").style.width=document.body.scrollWidth+10; 
    }
    </script>
      

  3.   

    补充一下:
    demo.htm<iframe src="in.htm" name="in" border="0" frameborder=0></iframe>in.htm 加入..<script language="Javascript"> 
    function window.onload() 

        if(document.body.scrollHeight <600)
           parent.document.all("in").height = 600;
        else
           parent.document.all("in").style.height=document.body.scrollHeight+15; 
    parent.document.all("in").style.width=document.body.scrollWidth+10; 
    }
    </script>
      

  4.   

    to ice_berg16(寻梦的稻草人) wanghr100(灰豆宝宝.net) :thanks