Sha*_*ief 4 iphone text uiwebview
我有兴趣只阅读UIWebView的TEXT内容.我该怎么做呢?我在网上找到了很多关于阅读HTML内容的帮助,但我只想要文本.有什么建议?
谢谢
ken*_*ytm 13
获取.textContent或.innerText根节点,而不是.innerHTML.
[web stringByEvaluatingJavaScriptFromString:@"document.documentElement.innerText;"];
Run Code Online (Sandbox Code Playgroud)
(顺便说一句,还有私人财产webView.text.)