javascript让iframe自适应高度
<script language="javascript">
<!--
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;
}
}
}
-->
</script>
<iframe width="200" src="/1.html" id="JKPlus_win" name="JKPlus_win" scrolling="no" frameborder="0" onload="Javascript:SetWinHeight(this)"></iframe>