首页 > 其他 > 详细

iframe自适应高度

时间:2014-12-09 12:05:19      阅读:270      评论:0      收藏:0      [点我收藏+]
<iframe src="http://www.fufuok.com/" id="iframepage" name="iframepage" frameBorder=0 scrolling=no width="100%" onLoad="iFrameHeight()" ></iframe>

Javascript代码: <script type="text/javascript" language="javascript">   function iFrameHeight() {     var ifm= document.getElementById("iframepage");     var subWeb = document.frames ? document.frames["iframepage"].document : ifm.contentDocument;     if(ifm != null && subWeb != null) {       ifm.height = subWeb.body.scrollHeight;     }   } </script>

 

iframe自适应高度

原文:http://www.cnblogs.com/shcolo/p/4152636.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!