偶已经理解到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>
试试这个
博客提到style=\height:expression(main.document.body.scrollHeight)\仅对首次显示的内嵌网页有效,内容更新需刷新主页才能自适应高度,唯一办法是点击链接后刷新整个页面,还给出了一段解决此问题的JavaScript代码及iframe示例。
2376

被折叠的 条评论
为什么被折叠?



