iframe自适应高度
废话不说先上代码
Html 标签代码
<iframe id="iframe1" src="" width="100%" onload="iframeLoad('iframe1')" scrolling="no" frameborder="0"></iframe>
js代码
function iframeLoad(id)
{
document.getElementById(id).height=0;
document.getElementById(id).height=document.getElementById(id).contentWindow.document.body.scrollHeight;
}