UIWebView通过JS语句获取网页(html)的某些数值
//To get string from the title of the HTML page: NSString *currentURL = [theWebView stringByEvaluatingJavaScriptFromString:@"document.getElementsByTagName('title')[0][removed];"]; //To get string from class name: NSString *someHTML = [theWebView stringByEvaluatingJavaScriptFromString:@"document.getElementsByClassName('class name')[0][removed];"]; //To get string from element id: NSString *html = [theWebView stringByEvaluatingJavaScriptFromString:@"document.getElementById('div id').textContent=''"];