JS代码
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; } } } }
HTML代码
<iframe width="100%" height="500" id="win" name="win" onload="Javascript:SetWinHeight(this)" frameborder="0" scrolling="no" src="default.html"></iframe>
时间: 2024-11-13 10:02:12