JQ图片路径批量修改,加上一个绝对地址,求大神指教

2025-04-07 16:58:14
推荐回答(1个)
回答1:

$('img').each(function(){
    $(this).attr('src').replace('/image/', 'http://shop.xxx.com/images/');
});