jQuery: contains () selector
Definition and Usage
: Contains () selector to select the element that contains the specified string.
The string can be included directly in the text element, or be included in the sub-elements.
The most common usage: used in conjunction with other selectors, select the specified combination contains specified text elements (such as the above example).
NOTE: The text is case sensitive.
grammar
$(":contains(text)")
参数 | 描述 |
---|---|
text | 必需。规定要查找的文本。 |