var id = document.getElementById('id');//子页面打开id if(id!=null){ var frameId =id.getElementsByTagName("iframe")[0].contentWindow.test(id,name); }
test是子页面的方法
或者
var iframe = window.parent.document.getElementsByTagName('iframe')[2]; var content = iframe.contentWindow.document.getElementById("iframeId"); content.contentWindow.initTaskList(currentTask,currentPage); 子页面调用父页面方法 window.parent.openUnCompany();