js后台提交成功后 关闭当前页 并刷新父窗体(转)

时间:2023-03-08 16:27:05

原文地址:http://www.cnblogs.com/chenghu/p/3696433.html

后台提交成功后 关闭当前页 并刷新父窗体

 this.ClientScript.RegisterStartupScript(this.GetType(), "message", "<script language='javascript' defer>alert('提交成功');if (window.opener && !window.opener.closed) {  window.opener.location.href = window.opener.location.href; } window.close();</script>");