文字列で終わるhrefを選択する質問する

文字列で終わるhrefを選択する質問する

ベストアンサー1

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

セレクタのドキュメントは以下にあります。http://docs.jquery.com/セレクタ

属性の場合:

= is exactly equal
!= is not equal
^= is starts with
$= is ends with
*= is contains
~= is contains word
|= is starts with prefix (i.e., |= "prefix" matches "prefix-...")

おすすめ記事