父窗體打開頁面的javascript
function GoToPage(id)
子頁面執(zhí)行代碼后:{ var title="title"; var url="xxxxx.aspx?ID="+id+"&Radom="+Math.random();; var Width="700"; var Height="600"; var arguemnts = new Object(); arguemnts.window = window; if (document.all&&window.print) { window.showModalDialog(url,arguemnts,"dialogWidth:" + Width + "px;dialogHeight:" + Height + "px;center:yes;status:no;scroll:yes;help:no;"); } else { window.open(url,"","width=" + Width + "px,height=" + Height + "px,resizable=1,scrollbars=1"); } } Response.Write("<script language=‘javascript‘>window.dialogArguments.window.location = window.dialogArguments.window.location;</script>");
如果是window.open打開的:Response.Write("<script>self.close();</script>"); Response.Write("<script language=‘javascript‘>window.opener.location.reload();</script>") ;
Response.Write("<script language=‘javascript‘>window.opener=null;window.close();</script>"); |
|