执行一段js代码
#pragma mark -- 收集JS页面传来的图片及添加图片点击事件
-(void)getImagesFromJSAndClickImgEvent:(WKWebView *)webView{
//这里是JS,主要目的: - 获取H5图片的url
static NSString * const jsGetImages =
@"function getImages(){\
var objs = document.getElementsByTagName(\"img\");\
var imgScr = '';\
for(var i=0;i= 2) {
[strongSelf.mUrlArray removeLastObject];
}
}];
[self.webView evaluateJavaScript:@"function registerImageClickAction(){\
var imgs=document.getElementsByTagName('img');\
var length=imgs.length;\
for(var i=0;i'+temp+'