contentWindow 和 contentDocument
来源:互联网 发布:腾讯数据分析做什么的 编辑:程序博客网 时间:2024/05/21 09:26
contentWindow 兼容各个浏览器,可取得子窗口的 window 对象。
contentDocument Firefox 支持,> ie8 的ie支持。可取得子窗口的 document 对象。
在子级iframe设置 父级 iframe ,或 孙级 iframe 高度:
function showIframeH(){ var parentWin = parent.document.getElementById("test"); if(!parentWin) return false; var sub = parentWin.contentWindow.document.getElementById("test2"); if(!sub) return false; var thirdHeight = sub.contentWindow.document.body.offsetHeight; //第三层 body 对象 sub.height = thirdHeight; //设置第二层 iframe 的高度 var secondHeight = x.contentWindow.document.body.offsetHeight; //第二层 body 对象 x.height = secondHeight; //设置第一层 iframe 的高度 //alert(secondHeight); //alert('body: ' + x.contentDocument.body.offsetHeight + ' div:' + thirdHeight);}
- contentWindow 和 contentDocument
- contentWindow 和contentDocument区别 及iframe访问
- IFRAMEs, .contentWindow, .contentDocument区别
- 关于 contentWindow, contentDocument
- 关于 contentWindow, contentDocument
- 关于 contentWindow, contentDocument
- 关于 contentWindow, contentDocument
- contentwindow & contentdocument
- contentwindow 和contentdocument dom对象和jquery对象
- 关于iframe中的contentWindow, contentDocument
- JS操作iframe里的DOM || contentWindow,contentDocument
- 各浏览器Iframe对contentWindow、contentDocument、document及frames属性测试
- 各浏览器Iframe对contentWindow、contentDocument、document及frames属性测试
- javascript 中contentWindow和 frames
- iframe.contentWindow
- 根据iframe的contentWindow来设置div屏蔽层大小和位置
- 框架的contentDocument支持问题
- iframe的 contentWindow属性
- JSP,JS获得项目路径
- 浅谈Java中的几种随机数
- 深入理解ARM体系架构(S3C6410)---arm7,arm9,arm11区别
- .vm后缀的文件 velocity
- Spring与mybatis的整合实践之SqlSessionDaoSupport抽象类
- contentWindow 和 contentDocument
- Java程序员必知的8大排序
- JS 里面对页面操作
- jsp中通过c set 保存值,在jsp中通过request getattribute 取值
- 判断磁盘类型
- hdu - 4334 - Trouble - 线性查找
- js中cookie的使用详细分析
- Java使用apache ant包进行文件压缩、解压
- 水货手机浏览器打开应用程序