jQuery中使用each(callback)方法可以很方便的遍历集合,如

$("img").each(function(i){
this.src = "test" + i + ".jpg";
});

相关文章:

  • 2021-12-10
  • 2021-12-10
  • 2021-12-10
  • 2021-12-10
  • 2021-12-02
  • 2022-12-23
猜你喜欢
  • 2021-12-10
  • 2021-12-10
  • 2022-12-23
  • 2021-10-24
  • 2021-05-23
  • 2021-12-10
相关资源
相似解决方案