jQuery Cheatsheet

来源:互联网 发布:英语好的软件 编辑:程序博客网 时间:2024/04/29 11:28

Attribute Selector


To identify the elements by their attributes:

前缀(Attribute Contains Prefix Selector)[name|="value"]选定的元素将符合以下条件,元素的该属性等于指定的值,或者该属性的前面部分是指定的值加上横线“-”。(Selects elements that have the specified attribute with a value either equal to a given string or starting with that string followed by a hyphen (-).)包含(Attribute Contains Selector)[name*="value"](Selects elements that have the specified attribute with a value containing the a given substring.)包含单词(Attribute Contains Word Selector)[name~="value"](Selects elements that have the specified attribute with a value containing a given word, delimited by spaces.)结尾(Attribute Ends With Selector)[name$="value"](Selects elements that have the specified attribute with a value ending exactly with a given string. The comparison is case sensitive.)等值(Attribute Equals Selector)[name="value"](Selects elements that have the specified attribute with a value exactly equal to a certain value.)不等值(Attribute Not Equal Selector)[name!="value"](Select elements that either don’t have the specified attribute, or do have the specified attribute but not with a certain value.)起始(Attribute Starts With Selector)[name^="value"](Selects elements that have the specified attribute with a value beginning exactly with a given string.)持有属性(Has Attribute Selector)[name](Selects elements that have the specified attribute, with any value.)多重属性(Multiple Attribute Selector)[name="value"][name2="value2"](Matches elements that match all of the specified attribute filters.)


Ref:

Category: Attribute


0 0
原创粉丝点击