1、检查你的iframe是否设置了高度2、不知道你用的什么语言,jsp的话可以用jsp:include来做。

解决方案 »

  1.   

    用div应该就可以了。<div>
    <iframe src="http://community.csdn.net/" width="100%" height="100%" ></iframe>
    </div>
      

  2.   

    function  IFrameAutoFit(minHeight)  
    {
    if(self!=top)  
    {
    var  iframe  =  window.parent.document.getElementById(window.name); 
    if(iframe)  
    {  
    iframe.style.height  =  10;  
    var  h  =  document.body.scrollHeight; 
    if(isNaN(minHeight)==false)
    {
    h  =  h<minHeight  ?  minHeight  :  h;  
    }
    else
    {
    var  minimalHeight  =  parseInt((window.screen.width*11)/16,  10)  -  280;  
    h  =  h<minimalHeight  ?  minimalHeight  :  h;  
    }
    if(window.navigator.appName  ==  "Microsoft  Internet  Explorer"  &&  iframe.frameBorder=="1")  h  +=  4; 
    iframe.parentNode.style.height  = iframe.style.height  =  h; 
    }  
    else  alert("Iframe's  id  unequal  to  iframe's  name!");  
    }  
      

  3.   

    function getCurrentIframe()
    {
     if(window!=top)
        {
    var s = parent.document.getElementsByTagName("iframe");
    for(var i=0; i<s.length; i++) 
    {
             if(s[i].contentWindow==window)         
             {
             return s[i];
             break;
             }
    }       
    }
    return null;
    }
    parObj.height = document.body.scrollHeight;
      

  4.   

    在被引入iframe的那个网页的onload里加入window.onload = function()
    {
       var parObj = parent.document.getElementById("iframe id"); 
       parObj.height = document.body.scrollHeight;
    }