1. 非模態窗口刷新
在父頁面打開子頁面代碼爲:
window.open(url,' ','height= 500px, width= 760px');
子頁面刷新父頁面代碼爲:
window.opener.document.location.reload();
2.模態窗口刷新
父頁面打開子頁面:
window.showModalDialog(url,'window','dialogHeight:550px; dialogWidth:800px; ');
子頁面刷新父頁面:
window.dialogArguments.location.reload();
window.showModalDialog和window.open都可以打開一個新的窗體,兩者的本質的區別僅僅在於用window.showModalDialog 打開的是一個模態窗口,而window.open打開的是一個非模態的窗口。