JS iframe父子页面元素调用方法 window parent top 解释
父窗口調用子窗口
var hasMore = parent.document.getElementByIdx_x_x_x("hasMore").value;
子窗口調用父窗口
document.frames["ifrmBoxFrame"].me.preLoadBoxGrid();
window.frames["iframe_ID"].document.getElementByIdx_x_x_x("iframe_document_object"-).object_attribute = attribute_value
window
是對當前窗口自身的引用
如:window.returnValue = ret;
window.close();
top
返回頂層窗口,即瀏覽器窗口。
如:top.frames[tabID].location = url;
top.document.frames("ifrmBoxFrame").me.executeQueryCond();
parent
返回父窗口
如:parent.$("Insheet_FrameTable").src = "";
parent.frames["Insheet_FrameSheetList"].initInsheetList(false);
http://www.terwer.com/js-iframe-parent-child-window-parent-element-to-invoke-the-methods-of-the-page-top-to-explain.html
轉載于:https://www.cnblogs.com/jliuwork/p/4066417.html
總結
以上是生活随笔為你收集整理的JS iframe父子页面元素调用方法 window parent top 解释的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: web网页的表单排版利器--960css
- 下一篇: 关于Windows® API Code