jQuery [attribute!=value]Selectors

jQuery 选择器jQuery Selectors

Examples

Select all <p> elements whose class attribute valueNois "intro":

$("p[class!='intro']")

Try it Yourself »

Definition and Usage

[attribute!=value] selector selects eachelement without the specifiedattribute and value.

Elements with the specified attribute but not the specified value will also be selected.


Syntax

$("[attribute!='value']")

Parameter Description
attribute Required. Specifies the attribute to search for.
value Required. Specifies the value to search for.


jQuery 选择器jQuery Selectors

Other Extensions