【发布时间】:2013-05-24 14:37:52
【问题描述】:
我有这个小问题,在 iOS 中 InAppBrowser 运行良好,但在 android 中没有办法,我打开白名单中的所有外部页面,我放了一个 console.log 来查看是否调用了方法,但这里没有打开我是如何处理的
链接:a href="#" onclick="openInAppBrowser('我的链接);" class="最近">
方法
enter code here
function openInAppBrowser(url){
console.log('click in app brownser');
console.log('page: ' + url);
window.open(encodeURI(url), '_blank', 'location=yes');
}
有什么想法吗?在iOS中可以正常工作,但在android中没有办法,如果有人可以帮助我
【问题讨论】:
-
您是否在 config.xml 中添加了:
<plugin name="InAppBrowser" value="org.apache.cordova.InAppBrowser" />?该函数被调用是因为您看到了console.log()语句,对吗? logcat 中有关于打开 inAppBrowser 的任何内容吗?什么版本的 Android,什么版本的 Cordova,您在设备上进行测试吗?
标签: android ios cordova inappbrowser