嗨,我有一个图像列表
images = '<img id="new" src="../../public/images/badges/newbw.png" alt="" width="60" title="Newbie: Shared first featured campaign" height="60">' +
'<img id="new1" src="../../public/images/badges/swbw.png" alt="" width="60" title="Newbie: Shared first featured campaign" height="60">'+
'<img id="new2" src="../../public/images/badges/sswbw.png" alt="" width="60" title="Newbie: Shared first featured campaign" height="60">'+
'<img id="new3" src="../../public/images/badges/adbw.png" alt="" width="60" title="Newbie: Shared first featured campaign" height="60">' +
'<img id="new4" src="../../public/images/badges/expbw.png" alt="" width="60" title="Newbie: Shared first featured campaign" height="60">'+
'<img id="new5" src="../../public/images/badges/supbw.png" alt="" width="60" title="Newbie: Shared first featured campaign" height="60">';
现在我只想替换
img id="new"
为新图像<img id="new" src="../../public/images/badges/new.png" alt="" width="60" title="Newbie: Shared first featured campaign" height="60">
维持其他人的原状。我发现很难,因为我的 jquery 知识有限。我如何在 jquery 中做到这一点。谢谢