jQuery [attribute * = value] Selector
Examples
Select all <input> element with a name attribute contains the string "nation" of:
$("input[name*='nation']")
try it"
Definition and Usage
[Attribute * = value] selector to select each element with a specified attribute and value contains the specified string.
grammar
$("[attribute*='value']")
参数 | 描述 |
---|---|
attribute | 必需。规定要查找的属性。 |
value | 必需。规定值要包含的字符串。 |