ASP.NET(C#)不提示直接关闭当前页面
2015-05-26 18:10
369 查看
protected void Button1_Click(object sender, EventArgs e)
{
//关闭按钮
//关闭页面--要弹出提示(IE6及以下不弹出提示)
ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>window.opener=null;window.close();</script>");
//不弹出提示直接关闭页面
ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>window.opener=null;window.open('','_self');window.close();</script>");
}
{
//关闭按钮
//关闭页面--要弹出提示(IE6及以下不弹出提示)
ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>window.opener=null;window.close();</script>");
//不弹出提示直接关闭页面
ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>window.opener=null;window.open('','_self');window.close();</script>");
}
相关文章推荐
- ASP.NET(C#)不提示直接关闭当前页面
- ASP.NET(C#)不提示直接关闭当前页面
- ASP.NET(C#)不提示直接关闭当前页面
- ASP.NET 直接关闭页面不弹出提示
- asp.net(C#)直接关闭网页而不弹出提示框(VS2008)
- asp.net 后台不提示关闭当前窗口
- asp.net的C#提示信息与页面跳转
- 如何用C#在Asp.net中实现打开新网页而不关闭当前页
- 如何用C#在Asp.net中实现打开新网页而不关闭当前页
- IE7下用js不提示直接关闭当前页面
- vs2003 asp.net中直接输出wml,并利用C#做动态页面的控制,不使用微软的移动控件
- 如何用C#在Asp.net中实现打开新网页而不关闭当前页
- 如何用C#在Asp.net中实现打开新网页而不关闭当前页
- asp.net后台关闭当前页面并传值的两种方法
- JS判断用户是否有权限进入当前页面,没有直接关闭(解决IE7以上版本提示问题)
- :如何用C#在Asp.net中实现打开新网页而不关闭当前页
- Asp.net 后台关闭当前页面并传值
- asp.net中关闭当前页面代码
- 如何用C#在Asp.net中实现打开新网页而不关闭当前页
- asp.net中关闭当前页面代码