Attribute Filters:Note: In jQuery 1.3 [@attr] style selectors were removed (they were previously deprecated in jQuery 1.2). Simply remove the '@' symbol from your selectors in order to make them work again.

Name Type
[attribute] Returns: Array<Element(s)>
Matches elements that have the specified attribute. Note the "@" before the attribute name was deprecated as of version 1.2.
[attribute=value] Returns: Array<Element(s)>
Matches elements that have the specified attribute with a certain value.
[attribute!=value] Returns: Array<Element(s)>
Matches elements that either don't have the specified attribute or do have the specified attribute but not with a certain value.
[attribute^=value] Returns: Array<Element(s)>
Matches elements that have the specified attribute and it starts with a certain value.
[attribute$=value] Returns: Array<Element(s)>
Matches elements that have the specified attribute and it ends with a certain value.
[attribute*=value] Returns: Array<Element(s)>
Matches elements that have the specified attribute and it contains a certain value.
[attributeFilter1][attributeFilter2][attributeFilterN] Returns: Array<Element(s)>
Matches elements that match all of the specified attribute filters.

 

相关文章:

  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
  • 2021-12-02
猜你喜欢
  • 2021-10-01
  • 2021-05-10
  • 2021-05-27
  • 2021-08-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案