window.close(),self.close()不适用于mozilla firefox [英] window.close(), self.close() not working on mozilla firefox
问题描述
我想在退出时关闭窗口。我用过了
I want to close window on logout. I have used
-
window.close()
, -
self.close()
, -
var win = window.open( ,_自); win.close();
-
window.parent.close();
window.close()
,self.close()
,var win = window.open("","_self"); win.close();
window.parent.close();
以上所有我已经在IE中使用了所有工作但在Mozilla Firefox中无法正常工作。
These all above i have used that all work in IE but in Mozilla Firefox not working.
请给我解决方案。
谢谢。
推荐答案
我试图查看有关window.close()的所有主题,并发现:
IE / Chrome / Safari(?)接受关闭,如果我们在_self上打开一些东西,所以一般
I tried to review all topics about window.close() and have found that: IE/Chrome/Safari(?) accept closure if we open something on _self, so generally
top.open('','_ self',''); top.close();
top.open('','_self',''); top.close();
完成工作。
FF(写这篇文章时为19)对此更加严格,并以某种方式禁止任何类似的探测。在相关主题中找到了很好的答案,用户必须手动允许FF使解决方案高于工作
does the work. FF (r 19 when writing this) is more strict about this and somehow forbids any probe like above. The good answer was found in related thread, that user must manually allow FF to have solution above working
about.config - > dom.allow_scripts_to_close_windows = true;
about.config -> dom.allow_scripts_to_close_windows = true;
我非常绝望,因为客户要求在完成的操作时关闭窗口。
向FF开发团队致敬。这正是它应该如何运作的;可惜只有很难找到它。
I was quite desperated, as Customer requested window closure on completed operation.
Big bravo to FF dev team. This is exactly how it should work; pity only is that is hard to find it.
Pawel。
这篇关于window.close(),self.close()不适用于mozilla firefox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!