我正在尝试通过Javascript
使用来打开新标签window.open()
,然后使用window.close()
来关闭,但window.close()
在Safari(iOS 8 GM种子)中似乎不起作用。这是代码:
A.html:
<button onclick="window.open('./B.html'); return false;">Open B</button>
B.html:
<button onclick="window.close();">Close</button>
我尝试了几种方法:setTimeout,window.open()
然后关闭,但无济于事。
有这种情况的解决方法吗?
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句