Latest web development tutorials

jQuery [attribute] 選擇器

jQuery 選擇器 jQuery選擇器

實例

選取帶有id 屬性的每個元素:

$("[id]")

嘗試一下»

定義和用法

[attribute] 選擇器選取帶有指定屬性的每個元素。


語法

$("[attribute]")

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


jQuery 選擇器 jQuery選擇器