您的位置:首页 > Web前端 > JavaScript

JS调用iframe父窗口元素和子窗口元素的方法

2013-02-21 14:07 337 查看
JS调用iframe父窗口元素和子窗口元素的方法,不错哦。
1、父窗口调用子窗口:
window.frames["iframe_ID"].document.getElementById("iframe_document_object"­).object_attribute = attribute_value

2、子窗口调用父窗口:
parent.document.getElementById("parent_document_object").object_attribute = attribute_value
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: