jQuery [attribute]Selector

jQuery 选择器jQuery Selector

Examples

Select every element with an id attribute:

$("[id]")

Try it Yourself »

Definition and Usage

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


Syntax

$("[attribute]")

Parameter Description
attribute Required. Specifies the attribute to find.


jQuery 选择器jQuery Selector

Other Extensions