jQuery [attribute=value]Selector

jQuery 选择器jQuery Selectors

Example

Select every element whose id attribute value is "choose":

$("[id=choose]")

Try it Yourself »

Definition and Usage

The [attribute=value] selector selects every element with the specified attribute and value.


Syntax

$("[attribute=value]")

Parameters Description
attribute Required. Specifies the attribute to look for.
value Required. Specifies the value to look for.


jQuery 选择器jQuery Selectors

Other Extensions