在UIWebView中仅加载来自网站的div

时间:2013-06-12 10:47:46

标签: ios objective-c html uiwebview

我正在开发一个iOS 6应用程序,我想在UIWebVIew中只加载网站中的div,就像在jquery .load(url #container)中一样。这可能吗?

1 个答案:

答案 0 :(得分:1)

你可以试试这个买我不确定: NSString * html = [myWebView stringByEvaluatingJavaScriptFromString:@“document.getElementById('div's ID')。textContent”];

的NSLog(HTML); 或用html做任何你想做的事......