Close Window in IE from javascript. (Small Hack)
2008-11-25 14:51
295 查看
Close Window in IE from javascript. (Small Hack)
Written by Kumar SPosted July 13, 2005 at 12:22 pm
When trying to close an window from javascript in IE, which is opened manually,
a security warning “The web page you are viewing is trying to close the window. Do you want to close this window? Yes|No ” is popping up. Is there any possibility to close a window silently? Yes.
-----------------------------------------------------------
Solution:
1)
A simple hack i found on the web will help to get rid of this situation.
this.focus(); self.opener = this; self.close(); 2)
Page.ClientScript.RegisterStartupScript(Me.GetType(), "close", "window.open('','_parent','');window.close();", True)
相关文章推荐
- Close Window in IE from javascript. (Small Hack)
- JavaScript无提示关闭当前页面窗口,兼容IE/Firefox/Chrome (Close the current page window without confirm by JavaScript, support all browsers)
- JavaScript无提示关闭当前页面窗口,兼容IE/Firefox/Chrome (Close the current page window without confirm by JavaScript, support all browsers)
- Why is the window.close() works in IE browser but not FireFox? "Warning: Scripts may not close windo
- KNOWN ISSUE: Cannot type Chinese character in client chat window from the client machine.
- Javascript:window.close()不起作用?
- javascript window.open in safari
- Get the content of an Iframe in Javascript – crossbrowser solution for both IE and Firefox
- JavaScript 覆盖document.createElement 方法 解决window.close在火狐下不兼容问题)
- How do I remove a particular element from an array in JavaScript?
- javascript:window.close()在chrome,Firefox下失效问题解决方法
- [javascript]解决IE7的window.close()弹出确认提示框(转)
- JavaScript : WINDOW FOR JAVASCRIPT,熟练window对象的open、close、alert、confirm、prompt、setTimeout、clearTimeout、setInterval、clearInterval、
- JavaScript window.location IE谷歌跳转路径不兼容
- Invoke IFrame/window in cross domain in IE&FF notes
- Javascript的for...in语句在IE和Firefox的差异
- 错误显示:2012-03-09 17:20:22.090 viewcontrollerjump[1191:207] *** Assertion failure in -[UIWindowController transition:fromViewController:toViewController
- javascript window.close() 去掉那讨厌的确认对话框
- 解决javascript:window.close()在chrome,Firefox下失效的问题
- Get the content of an Iframe in Javascript – crossbrowser solution for both IE and Firefox