把info类下面所有的a标签链接后天加"#article"。
jQuery(document).ready(function($){ $(‘.info a‘).each(function(){ let Ahref = $(this).html() + "#article"; $(this).attr("href",Ahref); });});
[jQuery]循环遍历改变a标签的href
原文:http://www.cnblogs.com/SoYang/p/7152868.html