Wex5循环某个div节点下的所有img标签,替换其src属性值
Model.prototype.newsDetailAfterRefresh = function(event){ var newsDiv = this.getElementByXid("newsContent"); var imgArr = $(newsDiv).find("img"); $.each(imgArr,function(index,o){ var newImgSrc = "/baas/harbinMetro/homePage"+$(o).attr("src")+"&realFileName=IMG"+justep.UUID.createUUID()+"&operateType=preview"; $(o).attr("src",newImgSrc); }); };