码迷,mamicode.com
首页 > Windows程序 > 详细

contentWindow和contentDocument

时间:2014-12-26 11:25:58      阅读:229      评论:0      收藏:0      [点我收藏+]

标签:

【contentDocument】

W3C的标准告诉我们,可以通过Dom对象的contentDocument属性来返回文档对象。
doc= document.getElementById(‘J_mainframe‘ ).contentDocument
IE6,IE7都不支持,IE8开始支持,需要如此访问 document.frames[‘J_mainframe‘].document;

【contentWindow】
contentWindow属性,这是个只读属性,返回指定的iframe的窗口对象。
它虽然不是标准的一部分,但各个主流浏览器都支持。

contentWindow和contentDocument

标签:

原文地址:http://my.oschina.net/guomingliang/blog/360724

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!