admin管理员组文章数量:1332359
Self.close()
is working For IE but For Chrome and Firefox it shows that
Scripts may close only the windows that were opened by it.
And This Page will not a popup and it is not open by java script so what are the alternative way to close window by Script which is not open by it.
Self.close()
is working For IE but For Chrome and Firefox it shows that
Scripts may close only the windows that were opened by it.
And This Page will not a popup and it is not open by java script so what are the alternative way to close window by Script which is not open by it.
Share Improve this question edited Jan 10, 2017 at 6:24 Suren Srapyan 68.7k14 gold badges125 silver badges117 bronze badges asked Jan 10, 2017 at 6:21 curogalcurogal 731 gold badge2 silver badges5 bronze badges2 Answers
Reset to default 0You simply can not close the window by script due to security reasons on chrome and firefox. But there is a workaround posted here. That works on chrome 40 and latest version as I have tested.
chrome closing of opened window
I know it's too late to answer but none of these solution worked for me . I wrote
onclick="top.window.close();"
and it worked .
本文标签: javascriptselfclose() or Windowclose() not working on Chrome and FirefoxStack Overflow
版权声明:本文标题:javascript - self.close() or Window.close() not working on Chrome and Firefox - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742316439a2451910.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论