Remove DIV from a webpage for webview android using Jsoup
``` {.lang-java .prettyprint .prettyprinted} <!DOCTYPE html>
Remove aa
bb
</html>
``` {.lang-java .prettyprint .prettyprinted}
webView = (WebView) findViewById(R.id.webView_test);
webView.setWebViewClient(new myWebClient());
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("htmlcode");
``` {.lang-java .prettyprint .prettyprinted} webView.setWebViewClient(new WebViewClient() {
@Override
public void onPageFinished(WebView view, String url) {
view.loadUrl("javascript:var con = document.getElementById('a'); " +
"con.style.display = 'none'; ");
}
}); ```
``` {.lang-java .prettyprint .prettyprinted} these code are for removing
``` {.lang-java .prettyprint .prettyprinted}
view.loadUrl("javascript:var con = document.getElementById('a'); " +
"con.style.display = 'none'; ");
{.lang-java .prettyprint .prettyprinted}
read more