WebView与js交互
https://juejin.cn/post/6844903785077309454
https://blog.csdn.net/thw_m/article/details/78583922
https://www.cnblogs.com/badaoliumangqizhi/p/14998460.html
与js交互并传递参数(一般是传递json):
https://www.cnblogs.com/badaoliumangqizhi/p/14998460.html
- android webview js alert对话框 不能弹出 解决办法
webview只是一个承载体,各种内容的渲染需要使用webviewChromClient去实现,所以set一个默认的基类WebChromeClient就行,代码如下:
mWebView.setWebChromeClient(new WebChromeClient());
谷歌浏览器远程调试webview
https://cloud.tencent.com/developer/article/1033164
https://blog.csdn.net/cnlikea/article/details/148972322
1)android代码中设置:WebView.setWebContentsDebuggingEnabled(true);
2)保证android与pc同一局域网
3)谷歌浏览器中输入:chrome://inspect/#devices
如果提示“⚠ Remote browser is newer than client browser. Try inspect fallback
if inspection fails.” 点击 inspect fallback
即可开启调试页面。
0 条评论