The grammatical rules are as follows:
$('a[href$="ABC"]')...
supports the following selection methods:
= The judgment is completely consistent;
!= does not match;
^=begins with a certain string;
$=ends with a certain string;
*=contains a certain character string.
Further, you can return the first record in the result set through $('a[href$="ABC"]:first')
If you need to traverse the result set: