var id = document.getElementById('id');//子页面打开id if(id!=null){ var frameId =id.getElementsByTagName("iframe")[0].contentWindow.test(id,name); }
test is the method of the subpage
or
var iframe = window.parent.document.getElementsByTagName('iframe')[2]; var content = iframe.contentWindow.document.getElementById("iframeId"); content.contentWindow.initTaskList(currentTask,currentPage); The child page calls the parent page method window.parent.openUnCompany();