是否有一种简单直接的方法可以根据data属性选择元素?例如,选择具有名为customerIDvalue的数据属性的所有锚点22.
data
customerID
22
我有点犹豫使用rel或其他属性来存储这些信息,但我发现根据存储在其中的数据选择元素要困难得多.
rel
jquery html5 custom-data-attribute
custom-data-attribute ×1
html5 ×1
jquery ×1