1.有父頁面部分代碼如下:
<div style="width:100%;height:auto">
<iframe src=' /sonIframe.jsp' width='100%' height='100%' frameborder='0' id='sonID'></iframe>
</div>
2.設父頁面有方法:
function closeIframe(){}
3.子頁面調用父頁面方法:
parent.window.closeIframe()
1.有父頁面部分代碼如下:
<div style="width:100%;height:auto">
<iframe src=' /sonIframe.jsp' width='100%' height='100%' frameborder='0' id='sonID'></iframe>
</div>
2.設父頁面有方法:
function closeIframe(){}
3.子頁面調用父頁面方法:
parent.window.closeIframe()
(function(d, s, id) { let js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) retur