Latest web development tutorials

jQuery [attribute] selector

jQuery selector jQuery selector

Examples

Select each element with the id attribute:

$("[id]")

try it"

Definition and Usage

[Attribute] selector to select each element with the specified attributes.


grammar

$("[attribute]")

参数 描述
attribute 必需。规定要查找的属性。


jQuery selector jQuery selector