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);