IFRAME自适应高度

<script>
function leftHeightAuto(){
document.all["leftFrame"].style.height=document.documentElement.clientHeight-167;
}
</script>

<IFRAME id="leftFrame" name="leftFrame" frameBorder=0 scrolling=auto
src="/view/jsp/share/frame/defaultLeftFramePage.htm"
width="200" style="height:expression(leftHeightAuto())">
</IFRAME>


有关iframe高度设定的问题!
http://bbs.blueidea.com/thread-1357166-1-1.html
<script>
function autoResize()
{
        try
        {
                document.all["test"].style.height=test.document.body.scrollHeight
        }
        catch(e){}
}
</script>

<iframe id=test style="height:expression(1); aho:expression(autoResize())" src="\">



滚动条
让竖条没有:
<body style='overflow:scroll;overflow-y:hidden'> 
</body> 
让横条没有:
<body style='overflow:scroll;overflow-x:hidden'> 
</body> 
两个都去掉?更简单了
<body scroll="no"> 
</body>

你可能感兴趣的:(iframe)