2011-09-26 80 views

回答

1

看起来好像已经有一个关于从WebView获取HTML代码的问题。请看看是:Is it possible to get the HTML code from WebView (主要教程是在这里:http://lexandera.com/2009/01/extracting-html-from-a-webview/

当然,一旦你的HTML代码(串),你可以做任何你想要如更换文本你想要的!

操纵HTML字符串可以加载到视图与下面的代码片段:

webview.loadData(newHtmlStr, "text/html", "utf-8"); 

newHtmlStr是新的数据,并且必须URI转义!