蓝森林首页 | 返回主页 | 本站地图 | 站内搜索 | 联系信箱 |
 您目前的位置:首页 > 自由软件 > 技术交流 > 应用编程


    

蓝森林 http://www.lslnet.com 2006年8月25日 8:28

中的用 height="100%" 不行?

<iframe> 中的用 height="100%" 不行?一会正常,一会不正常,高度被默认为0,请求解释问题的方法!

我也想知道答案

iframe放在单元格里,单元格(注意是单元格)高度设置为100%

dw新建文档会自动在第一行生成一句话,最好删掉

谢谢你,还有什么好方法么?还是不行的!

[html]
<iframe src="default.asp"  style="width: 100% ; border: 0px" frameborder=0 scrolling=no name=right onload="init()" border="0"></iframe>
<script>
var lastHeight;
function init() {
    aaa();
    lastHeight= right.document.body.scrollHeight;
    setInterval(function(){
        if(right.document.body.scrollHeight!=lastHeight) {
            aaa();
            lastHeight= right.document.body.scrollHeight;
            }
        },1);
}
function aaa(){
    document.all('right').height=right.document.body.scrollHeight + 20;
    }
</script>
[/html]

感谢这位仁兄大力相助!




Copyright © 1999-2000 LSLNET.COM. All rights reserved. 蓝森林网站 版权所有。 E-mail : webmaster@lslnet.com