您的位置:首页 > 其它

页面中获取iframe中的dom的方法

2012-07-03 13:04 211 查看
页面中获取iframe中的dom的方法
$("#inner",top.frames['test'].document).html();
兼容方法: top.frames['test'].document获取iframe中的document对象
不兼容: document.frames['test'].document;只有ie识别

页面中获取iframe中的dom的方法

$("#inner",top.frames['test'].document).html();

兼容方法: top.frames['test'].document获取iframe中的document对象

不兼容: document.frames['test'].document;只有ie识别

top是获取顶层的window对象

parent是获取父层的window对象
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: