框架的高度怎么才能根据网页自动伸缩

解决方案 »

  1.   

    <script>
    function autoResize() 

    try

    document.all("CommentNewListIframe").style.height 
    = CommentNewListIframe.document.body.scrollHeight; 

    catch(e) 



    }
    </script>这个昂
      

  2.   

    <iframe frameborder="0" name="CommentNewListIframe" id="CommentNewListIframe" scrolling="no"
    src="ceshiye.aspx" STYLE="height:100%; aho:expression(autoResize());width=100%"></iframe>
      

  3.   

    我一般都是在框架打开的页面里写js重新定义框架的大小的var objFrm=parent.document.getElementById("框架ID");
    objFrm.style.width=document.body.scrollWidth;
    objFrm.style.height=document.body.scrollHeight;
      

  4.   

    getElementById 为什么找不到框架啊
      

  5.   

    刚试了一下,super_kiss() 的真是强啊!
      

  6.   

    super_kiss 的方法简单实用。非常感谢!海南不言 2010-06-26