当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - Phonegap: open link in external browser only works by click in android

问题描述:

I have the following html in android (which works). When I click the 'a' tag the external browser in android is opened successfully:

<a id="redirect-button" onclick='window.open("https://www.link.com", "_system");'>Link</a>

However, when I have the javascript window.open("https://www.link.com", "_system"); in the controller, nothing happens. The phone stays in the app instead of exiting to the browser. Any idea on how I could put this to work without user interaction? Tyvm for your help...

分享给朋友:
您可能感兴趣的文章:
随机阅读: