iframe自动调整高度能在IE5里实现吗
生活随笔
收集整理的這篇文章主要介紹了
iframe自动调整高度能在IE5里实现吗
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
偶已經理解到style="height:expression(main.document.body.scrollHeight)"只對第一次顯示的內嵌網頁有效,如果里面的內容更新必須把主頁刷新一遍才能自動適應新的高度,那么惟一的解決辦法就是點擊鏈接后整個頁面都刷新一次,如何寫成一個javascript的代碼,因為右邊是QQ的Javascritp的代碼導航欄!各位大人想點辦法!謝謝了!
<script>
function autoResize()
{
try
{
document.all["shit"].style.height=shit.document.body.scrollHeight
}
catch(e){}
}
</script>
<iframe name="shit" src=="shit.do" style="funny:expression(autoResize())" align="left" width="100%" marginwidth="0" marginheight="0" scrolling="no" FRAMEBORDER="0"></iframe>
</td></tr>
</table>
試試這個
<script>
function autoResize()
{
try
{
document.all["shit"].style.height=shit.document.body.scrollHeight
}
catch(e){}
}
</script>
<iframe name="shit" src=="shit.do" style="funny:expression(autoResize())" align="left" width="100%" marginwidth="0" marginheight="0" scrolling="no" FRAMEBORDER="0"></iframe>
</td></tr>
</table>
試試這個
總結
以上是生活随笔為你收集整理的iframe自动调整高度能在IE5里实现吗的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ASP.NET 学习历程
- 下一篇: asp.net实现C#代码加亮显示