windows.open 封锁刷新父页面实现

windows.open 关闭刷新父页面实现。

在子页面中

Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "<script>alert('修改成功!');window.opener.location.href=window.opener.location.href;window.parent.close();</script>");

 

即可实现父页面刷新,子页面关闭。

 其中window.parent.close();是代表将子页面关闭。

window.opener.location.href=window.opener.location.href;代表刷新父页面。