<div class="de1">
<img src="" alt=""/>
</div>
<div class="de2">
<img src="" alt=""/>
</div>
<div class="de3">
<img src="" alt=""/>
</div>
<div class="de4">
<img src="" alt=""/>
</div>
<div class="de5">
<img src="" alt=""/>
</div>
<div class="de6">
<img src="" alt=""/>
</div>
<div class="de7">
<img src="" alt=""/>
</div>
<div class="de8">
<img src="" alt=""/>
</div>
1 回答
用户已禁用
TA贡献5条经验 获得超2个赞
$('div img').each(function (index, img) { var src = ""; switch(index) { case 0: src = "#1"; // image 1 url break; case 1: src = "#2"; // image 2 url break; ... default: break; } $(img).attr('src', src) });
- 1 回答
- 0 关注
- 4365 浏览
相关问题推荐
添加回答
举报
0/150
提交
取消