随笔-77  评论-5  文章-2  trackbacks-0

divHtml = divHtml + "<iframe src='about:blank' style='position:absolute;top:0px;left:0px; visibility:inherit;  width:190px;height:232px;z-index:-1; scrolling='no' frameborder='0' filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';'></iframe>"
  

document.all.myDiv.innerHTML = divHtml;

 

这种方式有个问题,就是width和height写死了,

如果div自身设置了width和height,可以将iframe的width,height设置成100%

divHtml = divHtml + "<iframe src='about:blank' style='position:absolute;top:0px;left:0px; visibility:inherit;  width:100%;height:100%;z-index:-1; scrolling='no' frameborder='0' filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';'></iframe>"


文章来源:http://stocknewbie.bokee.com/viewdiary.18876477.html
posted on 2009-05-01 10:52 huohuo 阅读(235) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: