如何在webView中检测内容宽度? 此方法返回的不是宽度:
setWebViewClient(new WebViewClient() {
@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
injectJavascript();
loadUrl("javascript:alert(document.body.offsetWidth)");
}
});