在<iframe Src="URL"的
url文件里用<body onload="parent.document.all.iframeID.style.height=document.body.scrollHeight">

解决方案 »

  1.   

    这段代码很完整吧,我试过,同样不行,我倒。
    function window.document.onreadystatechange(){
        if(document.body.readyState == "complete"){
            document.all.framemain.height=document.all("iframeName").document.body.scrollHeight
            }
    }
      

  2.   

    <iframe id=mxh tyle="height:200px" src="a.htm"></iframe>a.htm<body onload="parent.document.all.mxh.style.height=document.body.scrollHeight">
    <p>1<p>1<p>1<p>1<p>1<p>1<p>1<p>1<p>1<p>1<p>1<p>1<p>1<p>1<p>1<p>1<p>1<p>1<p>1<p>1<p>1
      

  3.   

    iframe的src可以和外面的不是一个domain,可以通过里面的控制外面的,但好像不可从外面控制里面。