iOS webview 获取html中的图片地址

  //js代码,声明1个数组,对img 进行遍历,采用,分割多个url


NSString * getAllImages = @"var str = new Array();" "$('img').each(function(){str.push($(this).attr('src'));});" "str.join(',') "; NSString * imagerUrls = [self.webView stringByEvaluatingJavaScriptFromString: getAllImages]; NSLog(@"%@", imagerUrls);
原文地址:https://www.cnblogs.com/qzp2014/p/5393984.html