self.close()不适用于mozilla [英] self.close() not working for mozilla

查看:103
本文介绍了self.close()不适用于mozilla的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

self.close()在IE中正常工作但在Mozilla中没有。有谁知道这是什么问题,我该如何解决?

self.close() is working fine in IE but not in Mozilla. Does anyone know what is the issue and how can I solve it?

推荐答案

你是否用 window.open ? 根据window.close上的文档


只允许对使用window.open方法由脚本打开的窗口调用此方法。如果脚本未打开窗口,则JavaScript控制台中将显示以下错误:脚本可能无法关闭脚本未打开的窗口。

This method is only allowed to be called for windows that were opened by a script using the window.open method. If the window was not opened by a script, the following error appears in the JavaScript Console: Scripts may not close windows that were not opened by script.

这篇关于self.close()不适用于mozilla的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆