iframe 自适应
来源:互联网 发布:淘宝子账号怎么申请 编辑:程序博客网 时间:2024/05/18 19:19
<iframe src="/en/product/ldsdf.html" id="iframepage" name="iframepage" frameBorder=0 scrolling=no width="100%" onLoad="reinitIframeEND();" ></iframe>
<script type="text/javascript" language="javascript">
function reinitIframe(){
var iframe = document.getElementById("iframepage");
try{
var bHeight = iframe.contentWindow.document.body.scrollHeight;
var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
var height = Math.max(bHeight, dHeight);
iframe.height = height;
}catch (ex){}
}
var timer1 = window.setInterval("reinitIframe()", 500); //定时开始
function reinitIframeEND(){
var iframe = document.getElementById("iframepage");
try{
var bHeight = iframe.contentWindow.document.body.scrollHeight;
var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
var height = Math.max(bHeight, dHeight);
iframe.height = height;
}catch (ex){}
// 停止定时
window.clearInterval(timer1);
}
</script>
0 0
- iframe自适应
- iframe 自适应
- 自适应iframe
- iframe 自适应
- iframe自适应
- iframe自适应
- iframe自适应
- iframe自适应
- iframe 自适应
- iframe自适应
- iframe 自适应
- Iframe自适应
- iframe 自适应
- 自适应IFrame(IFRAME AutoStretch)
- iframe自适应、iframe跨域自适应
- Iframe高度自适应
- iframe 的自适应高度
- 是Iframe高度自适应
- Java 关键字this详解
- Weiss-(DSAA - in C,1.3)字谜游戏
- 为什么你开发的项目要花这么长时间?
- QT的信号/槽机制
- 深入理解Android(一):Gradle详解
- iframe 自适应
- Codeforces Round Intel Code Challenge Final Round A.Checking the Calendar
- SQL注入攻击入门
- Yii正则验证
- 从0开始学习 GITHUB 系列之「加入 GITHUB」
- 本地无法连接服务器mysql数据库
- 毫秒数转时分秒
- 除去集合中的重复数据
- 最新的SSH框架(Spring4.3.3 +Struts2.5.2+Hibernate5.2.3)搭建