获取WebView里的网页文本内容,能够採用例如以下方法:

public class ComJSInterface {
         public void loadHtmlContent(String content) {
		Log.d("comJs", "html:" + content);
	}
}

	mWebView.addJavascriptInterface(new ComJSInterface(), "comjs");
	mWebView.loadUrl("javascript:comjs.loadHtmlContent(document.documentElement.outerHTML);void(0);");




相关文章:

  • 2022-02-07
  • 2022-02-09
  • 2021-08-08
  • 2022-12-23
猜你喜欢
  • 2022-01-23
  • 2022-02-12
  • 2021-09-20
  • 2021-12-31
  • 2021-04-01
相关资源
相似解决方案