window.opener=null,window.close() 这样关闭当前页面还是有提示(在线急)

coooooooooool 2009-10-31 05:56:27
在asp.net中
在a.aspx(菜单页)中打开b.aspx(模式窗体页面),
我想关闭b.aspx不能用按钮直接Response.Write("<script>window.close()</script>");
我想到了一个办法,就是在b.aspx中直接跳转到c.aspx(空白页)
在c.aspx中的Pape_load中:
Response.Write("<script>window.opener.top.close()</script>");//关闭b.aspx
Response.Write("<script>window.opener=null;window.close();</script>");//关闭当前c.aspx
这样就关闭b.aspx了
可是问题出在总是提示确定关闭提示框,怎么不让提示框呢???????
...全文
230 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
zxnsanguo1124 2012-10-29
  • 打赏
  • 举报
回复
6楼给力
sundotLei 2009-10-31
  • 打赏
  • 举报
回复

IE7,IE8 关闭自身窗口,不弹出确认框
<a href="#" onclick="window.open('','_self');window.close();">不弹出确认关闭 </a>
HenJiong 2009-10-31
  • 打赏
  • 举报
回复
window.close() 必然有提示.
happy664618843 2009-10-31
  • 打赏
  • 举报
回复
或者你用window.open
window.showModaldialog
浴火_凤凰 2009-10-31
  • 打赏
  • 举报
回复
不是脚本自己打开的窗口一般情况下都会有提示信息的
coooooooooool 2009-10-31
  • 打赏
  • 举报
回复
跟我的一样啊,就是合成一句了不是吗,不行这样
happy664618843 2009-10-31
  • 打赏
  • 举报
回复
Response.Write(" <script>window.opener.top.close();window.opener=null;window.close() </script>")

87,993

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧