admin管理员组文章数量:1302930
window.close();//false
window.open(location, '_self', '');
window.close();//false
open(location, '_self').close();//false
Chrome 45.0.2454.85 m, Firefox also has the problem.
Please help...
Console option screenshot
window.close();//false
window.open(location, '_self', '');
window.close();//false
open(location, '_self').close();//false
Chrome 45.0.2454.85 m, Firefox also has the problem.
Please help...
Console option screenshot
Share Improve this question edited Mar 11, 2016 at 9:07 Keefe asked Mar 11, 2016 at 9:05 KeefeKeefe 311 gold badge1 silver badge4 bronze badges 01 Answer
Reset to default 3You should store your opened window in a variable.
var popup = window.open(location, '_blank', '');
popup.close();
EDIT: Opening in _self does not work since you open a new page in the same screen, you might want to do _blank like i've edited.
本文标签: javascriptChrome “Scripts may close only the windows that were opened by it” errorStack Overflow
版权声明:本文标题:javascript - Chrome “Scripts may close only the windows that were opened by it” error - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741742989a2395366.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论