你好 我正在尝试使用 PhoneGap 为 iPad 开发应用程序。我想在 index.html 页面内动态加载外部网站的主页。 不幸的是使用
window.location.href = "http://mywebsite.com/cgi-bin/index.py"
触发 Safari 窗口的打开而不是使用 PhoneGap 容器。
有什么建议吗?
非常感谢
子句
最佳答案
还有一个更简单的选择:修改config.xml
Open all links in WebView
stay-in-webview with values true or false
example:
<preference name="stay-in-webview" value="true" />
if set to true, all links (even with target set to blank) will open in the app's webview
only use this preference if you want pages from your server to take over your entire app
default is false
关于javascript - 在 PhoneGap 中调用 window.location.href 触发网络浏览器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5897955/