jQuery 循环遍历改变a标签的href(实例讲解)
把info类下面所有的a标签链接后天加"#article"。
jQuery(document).ready(function($){ $('.infoa').each(function(){ letAhref=$(this).html()+"#article"; $(this).attr("href",Ahref); }); });
以上这篇jQuery循环遍历改变a标签的href(实例讲解)就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持毛票票。