<iframe src="XXX.htm" width="700px" frameborder="0" id="frmsrc" scrolling="no" marginheight="0" onload="AutoIframe()"></iframe>
<script type="text/javascript">
function AutoIframe()
{
if(document.readyState!='complete')
{
setTimeout( function(){AutoIframe();},25 );
return;
}
else
{
var ifobj=document.getElementById("frmsrc");
ifobj.height= ifobj.contentWindow.document.body.scrollHeight;
}
}
</script>
//PS: XXX.htm不可跨域
<iframe src="dd.html" id="frmMain" name="frmMain" width="99%" height="100%" frameborder=0 scrolling=no marginHeight=0 marginWidth=0 onload="Javascript:SetWinHeight(this)" ></iframe>
function SetWinHeight(obj)
{
var win=obj;
if (document.getElementById)
{
if (win && !window.opera)
{
if (win.contentDocument && win.contentDocument.body.offsetHeight)
win.height = win.contentDocument.body.offsetHeight;
else if(win.Document && win.Document.body.scrollHeight)
win.height = win.Document.body.scrollHeight;
}
}
}

↓↓↓
【白嫖福利 | 限时领取】
摹客超级版会员(价值1250元)解锁摹客协作、摹客RP、摹客DT所有功能。
公众号主页发送 “激活” 免费获取 激活码
↓↓↓
公众号主页发送 “字体” 获取 全套可商用字体包...
↓↓↓
公众号主页发送 “vi” 获取 500个著名品牌vi设计手册...