代码改变世界

js关闭子页面刷新父页面

2014-11-03 17:08  NO.27  阅读(693)  评论(0)    收藏  举报

 

一、打开方式为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();