1

我有这个小问题,在 iOS InAppBrowser 中运行良好,但在 android 中没有办法,我打开白名单中的所有外部页面,我放了一个 console.log 来查看是否调用了方法,但这里没有打开我如何处理接着就,随即

链接:a href="#" onclick="openInAppBrowser('我的链接);" 类="最近">

和方法

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中没有办法,如果有人可以帮助我

4

1 回答 1

0

您是否在 webview 上启用了 JavaScript?

http://developer.android.com/guide/webapps/webview.html

 WebView myWebView = (WebView)   findViewById(R.id.webview);
 WebSettings webSettings = myWebView.getSettings();
 webSettings.setJavaScriptEnabled(true)
于 2013-05-24T14:45:09.840 回答