在right.aspx页面的按钮中打index.htm和WebForm3.aspx页面的代码怎么写?

解决方案 »

  1.   

    <a href="#" onclick="javascript:window.close();">关闭本页</a>
    推出系统这个不太明白你的意思,你可以照着关闭本页的代码写,跳到某一页
    location.href='logout.aspx';
      

  2.   

    to  小老鼠 
    这不是winForm,编译都通不过!
      

  3.   


    to momoguagua(呱呱)  谢谢你!“退出系统”就是关闭整个B/S应用系统的所有页面!我想关闭主页面就可以了!
      

  4.   

    在Button1_Click()内写<a href="#" onclick="javascript:window.close();">关闭本页</a>
    不行呀!
      

  5.   

    Button1_Click()里写的话要这么写
    Response.Write("<script language='javascript'>window.close();</script>");
      

  6.   

    this.close();
    Application.Exit();
      

  7.   

    page_load 中写 
    Button1.Attributes.Add("onclick", "window.close();")
      

  8.   

    非常感谢各位! to momoguagua(呱呱)  用下面代码是可以关闭当前页了!可以它要弹出确认关闭的提示,我再是在做一个登录窗口,希望Button1_Click()中自动关闭当前窗口,然后打开主窗口?
    请问怎么让下面的代码不出现提示框,怎么来打开主窗口页面index.htm和WebForm3.aspx它能用同样的代码打开吗?Response.Write("<script language='javascript'>window.close();</script>");
      

  9.   

    Response.Write("<script language='javascript'>window.close();</script>");to momoguagua(呱呱)  用上面代码是可以关闭当前页了!可以它要弹出确认关闭的提示,我现在是在做一个登录窗口,希望在Button1_Click()中登录成功后,自动关闭当前窗口,然后打开主窗口!
    1、请问怎么让下面的代码不出现提示框?
    2、在Button1_Click()中打开主窗口页面index.htm和WebForm3.aspx的代码怎么写?它相同吗?
      

  10.   

    修改一下
    Response.Write("<script language='javascript'>window.opener=null;window.close();</script>");
    Button1_Click()中自动关闭当前窗口,然后打开主窗口?
    在html的<body>里面加上 onUnload="window.open('index.htm');"
      

  11.   

    js中对话框
    showModalDialog(),
    showModelessDialog(),
    window.alert(),
    window.confirm(),
    window.prompt().
      

  12.   

    2、在Button1_Click()中打开主窗口页面index.htm和WebForm3.aspx的代码怎么写?它相同吗?
    如果在当前页面的基础上打开index.htm或者WebForm3.aspx用
    Response.Redirect("index.htm");
    如果要用新窗口
    Response.Write("<script language='javascript'>window.open('index.htm');</script>");
      

  13.   

    非常感谢大家!to momoguagua(呱呱) 你真是厉害了!上页的问题都OK了!再问一下!用下面的代码显示提示信息时,当前页面马上变成了空白,只有关闭提示框后,当前页面才恢复正常!这问题怎么解决?Response.Write("<script>alert('登录不正确!');</script>")