Html
target='_Self'Js
Self.location='新页面.aspx';JS
window.open('新页面');
window.top.close();

解决方案 »

  1.   

    window.open('Login.aspx','','');
    window.parent.close()
      

  2.   

    在当前页面重定向需要关闭当前窗体吗?
    直接重定向就可以了啊<script>
    function LogOut()
    {
    window.open("../login.aspx","_parent","fullscreen=1");
    }
    </script>
      

  3.   

    public static void ShowAndRedirect(System.Web.UI.Page page, string msg, string url, string frame)
        {
            StringBuilder Builder = new StringBuilder();
            Builder.Append("<script language='javascript' defer>");
            Builder.AppendFormat("alert('{0}');", msg);
            Builder.AppendFormat("top." + frame + ".location.href='{0}'", url);
            Builder.Append("</script>");
            page.RegisterStartupScript("message", Builder.ToString());    }添加以上函数,页面调用ShowAndRedirect(this, "已退出!", "index.aspx", "self");
      

  4.   

    Response.Write("<script>parent.location.href='Index.aspx';</script>");
      

  5.   

    謝謝window.open('Login.aspx','','');
    window.parent.close()
    我用這個時為什么總提示要不要關閉﹐有沒有辦法可以讓直接關閉而不提示
      

  6.   

    Response.Write("<script>window.open('../login.aspx','_top');</script>");
      

  7.   

    http://www.dotnetxx.cn/shownews.aspx?id=17
      

  8.   

    <A id=lnkLogout href="UserLogin.aspx" class="mycolor"
                target=_top>
    这样不行?