请问,在html中我怎么用js或者jq给a 标签添加一个data-target="#join_cart"的属性
用jquery选择器,选择这个a标签,如通过ID$('#someid').attr('data-target', '#join_cart');