iframe内容未知,高度可预测
来源:互联网 发布:黑客页面源码 编辑:程序博客网 时间:2024/06/04 19:47
<iframe src="backtop.html" frameborder="0" scrolling="no" id="external-frame" onload="setIframeHeight(this)"></iframe>
<script type="text/javascript">
/*
* When the iframe is on a different subdomain, uncomment the following line
* and change "example.com" to your domain.
*/
function setIframeHeight(iframe) {
if (iframe) {
var iframeWin = iframe.contentWindow || iframe.contentDocument.parentWindow;
if (iframeWin.document.body) {
iframe.height = iframeWin.document.documentElement.scrollHeight || iframeWin.document.body.scrollHeight;
}
}
};
/*
* When the iframe is on a different subdomain, uncomment the following line
* and change "example.com" to your domain.
*/
function setIframeHeight(iframe) {
if (iframe) {
var iframeWin = iframe.contentWindow || iframe.contentDocument.parentWindow;
if (iframeWin.document.body) {
iframe.height = iframeWin.document.documentElement.scrollHeight || iframeWin.document.body.scrollHeight;
}
}
};
window.onload = function () {
setIframeHeight(document.getElementById('mainFrame'));
};
</script>
setIframeHeight(document.getElementById('mainFrame'));
};
</script>
阅读全文
0 0
- iframe内容未知,高度可预测
- iframe 自适应内容高度
- iframe 自适应内容高度
- iframe高度自适应内容
- iframe高度自适应内容
- IFrame自适应内容高度
- iframe随内容改变高度
- IFrame根据内容自适应高度
- IFrame 根据内容自适应高度
- iframe自适应框架内容高度
- iframe根据内容自适应高度
- iframe里面内容高度自适应
- 实现iFrame自适应高度 适应内容高度
- iframe 自适应高度,更改内容时iframe高度怎么根据新的内容高度自动改变
- Iframe自适应其加载的内容高度
- 根据内容自动调整IFrame高度
- Iframe自适应其加载的内容高度
- 根据内容调整iframe的高度
- 第一个设置a的bit3,第二个清除a的bit3
- 聊聊“速8”美女黑客控制僵尸车
- 阿里云生态日沙龙申请及落地规则
- 产品设计读书笔记
- 云栖Android精华文章合集
- iframe内容未知,高度可预测
- 44. Wildcard Matching
- caffe
- socket的accept函数解析以及服务器和多个客户端的端口问题
- 简单介绍java Enumeration
- Bootstrap table 简单示例
- K-Means聚类算法的实现
- JS Date()相关方法获取年月日时分秒
- javascript实现锁定网页、密码解锁效果(类似系统屏幕保护效果)