asp.net点击按钮关闭窗口并刷新父页面
我想在弹出的页面中,点击按钮后关闭窗口,并刷新父页面,代码Response.Write("<script language=javascript>alert('修改成功');opener.location.reload();window.close();</script>");他弹出出一个框说“如果正在交易,......”我怎么做让他不弹这个框,点击按钮后直接关闭窗口, --------------------编程问答-------------------- var sReturn=window.showModalDialog("" + id,'','dialogWidth:420px;dialogHeight:570px,center=yes,status=no,resizable=no,scroll=no,dialogHide=on');;
在子页面
function reload()
{
window.close();
}
加入 <base target="_self"/>
或
window.dialogArguments.window.location = window.dialogArguments.window.location; self.close();
--------------------编程问答-------------------- 在 window.open打开的窗口中,关闭子窗口并刷新父窗口
window.opener.location.reload();window.opener=null;window.close();
--------------------编程问答-------------------- 点击确定按钮后面添加下面两句代码
this.Response.Write("<script>window.opener.location.href=window.opener.location.href;window.close();</script>");
this.Response.Write("<script>window.opener.location.replace(window.opener.document.referrer);window.close();</script>");
补充:.NET技术 , C#