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; } } } <iframe src="bn_mid.jsp" οnlοad="Javascript:SetWinHeight(this)"></iframe>
本文转自 winters1224 51CTO博客,原文链接:http://blog.51cto.com/winters1224/797785,如需转载请自行联系原作者