js关闭子页面刷新父页面

 

一、打开方式为window.open

window.opener.location.reload();

二、打开方式为window.showModalDialog

首先在打开时的时候要设置window参数

window.showModalDialog("xx.aspx",window);

页面里要使用

var a = window.dialogArguments

a.location.href=a.location.href;

window.close();


 

你可能感兴趣的:(js)