Latest web development tutorials

jQueryの[属性$ =値]セレクタ

jQueryのセレクタ jQueryのセレクタ

href属性の<a>要素の末尾に「.ORG」とすべてを選択するには:

$("a[href$='.org']")

»をお試しください

定義と使用法

[属性$ =値]セレクタは、それぞれを選択して、指定された属性で指定した文字列要素で終了します。


文法

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

参数 描述
attribute 必需。规定要查找的属性。
value 必需。规定属性值以其结尾的字符串。


jQueryのセレクタ jQueryのセレクタ