关闭当前窗口

 1 /// <summary>
2 /// 关闭当前窗口
3 /// </summary>
4 public static void CloseWindow()
5 {
6 #region
7 string js = @"<Script language='JavaScript'>
8 parent.opener=null;window.close();
9 </Script>";
10 HttpContext.Current.Response.Write(js);
11 HttpContext.Current.Response.End();
12 #endregion
13 }

 

posted @ 2012-01-29 10:08  名字随意  阅读(120)  评论(0编辑  收藏  举报