开发者

Closing an opened window on mobile safari with javascript?

In app mode, if I open a new window using javascript, the newly-opened window cannot close itself (on an on-开发者_StackOverflow中文版click event) using the standard window.close() or self.close(). Does anyone know if there's an alternate method?

What I find most beguiling about this is that it goes against Apple's very own design guidelines: essentially a site has the ability to open a new window but the user cannot get out of it without closing the webapp using the Home button.

Any ideas? Thanks!


JavaScript:window.self.close() is how to do that.


you can try this js code snippet. var win = window.open('','_self'); win.close();

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜