简体   繁体   English

Android浏览器运行javascript window.close()?

[英]Android browser run javascript window.close()?

Is it possible to close an Android browser window with window.close() or something related? 是否可以使用window.close()或相关内容关闭Android浏览器窗口? I can't get anything to work on Android (on desktop browsers Chrome and Firefox I can window.close() without problems). 我无法在Android上使用任何工具(在台式机浏览器Chrome和Firefox上,我可以使用window.close()没问题)。

Thanks 谢谢

Unfortunately, No. 抱歉不行。

I have a situation where I launch the zxing scanner app from my browser. 我遇到从浏览器启动zxing扫描仪应用程序的情况。 It returns in a new browser window. 它会在新的浏览器窗口中返回。 I snag the data but then need to close that tab. 我获取数据,但随后需要关闭该选项卡。 And have yet to find a solution to get that tab closed, either through a user clicking a button on the page or in the body load. 还没有找到一种解决方案来关闭该选项卡,方法是通过用户单击页面上或主体负载中的按钮。 So it seems you can only put instructions on the page to have the user close the tab. 因此,看来您只能在页面上放置说明以使用户关闭标签。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM