子窗口关闭是刷新父窗口的一个奇怪问题,快来啊!!
我在WebForm1.aspx中的一个Button(asp控件)事件中用Page.RegisterStartupScript("rrr", "<script language=javascript>window.showModalDialog('WebForm2.aspx');</script>");打开一个窗口WebForm2.aspx,在WebForm2.aspx中用Button(asp控件)关闭子窗口,同时刷新父窗口,可如下语句都不起作用,不知为何?
1:Page.RegisterStartupScript("myJs","<SCRIPT LANGUAGE=\"JavaScript\">window.close();window.opener.location = window.opener.location.href;</SCRIPT>");
2:Response.Write ("<script>window.close();window.opener.parent.location='WebForm1.aspx';</script>");
3.Response.Write ("<script>window.close();top.dialogArguments.location.reload();</script>");
4.Page.RegisterStartupScript("CloseAndRefrsh","<script language='javascript'>window.close();window.opener=null;window.parent.lacation.reload();</script>");
5.Response.Write("<script>window.close();document.123.href='WebForm1.aspx';</"+"script>");
请大侠帮忙!!