标签:uiwebview span 标签 webview string oms object user result
wkwebview方法如下:
[webView evaluateJavaScript:@"navigator.userAgent" completionHandler:^(id result, NSError *error) {
NSString *string=result;
NSLog(@"result====%@",string);
}];
uiwebview方法如下:
UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectZero];
NSString *string = [webView stringByEvaluatingJavaScriptFromString:@"navigator.userAgent"];
有关wkwebview和UIwebview获取html中的标签方法
标签:uiwebview span 标签 webview string oms object user result
原文地址:http://www.cnblogs.com/super-zyl/p/6610532.html