本文主要为大家带来一篇jquery 循环遍历改变a标签的href(实例讲解)。小编觉得挺不错的,现在就分享给大家,也给大家做个参考。一起跟随小编过来看看吧,希望能帮助到大家。
把info类下面所有的a标签链接后天加"#article"。
jQuery(document).ready(function($){
$('.info a').each(function(){
let Ahref = $(this).html() + "#article";
$(this).attr("href",Ahref);
});
});相关推荐:










