function fn(){ image_src = $('.details-text2 img'); for(var i=0;i<image_src.length;i++){ str = image_src[i].getAttribute('src'); var str2 = str.replace(/\/Public\/Static\/ueditor\/php\/upload\/image/g,'\/upload/portal'); $('.details-text2 img:eq('+i+')').attr('src',str2); } fun(); }
字符串替换?
猜你喜欢
转载自blog.csdn.net/xiaohu12685/article/details/80117374
今日推荐
周排行