ASP.NET里常用的JS(14) var szFeatures = 'dialogWidth:'+iWidth+';dialogHeight:'+iHeight+';dialogLeft:0px;dialogTop:0px;center:yes;help=no;resizable:on;status:on;scroll=yes';this.parent.location.replace('"+parentWindowUrl+"','"+caption+"',szFeatures);</script>"; }
HttpContext.Current.Response.Write(js); } /// <summary> /// 函数名:ReplaceOpenerWindow /// 功能描述:替换当前窗体的打开窗口 /// </summary> /// <param name="openerWindowUrl">当前窗体的打开窗口</param> public static void ReplaceOpenerWindow(string openerWindowUrl) { string js=@"<Script language='JavaScript'> window.opener.location.replace('"+openerWindowUrl+"');</Script>"; HttpContext.Current.Response.Write(js); }
/// <summary>