Questions tagged «jquery-1.6»

10
按文字选择链接(完全匹配)
使用jQuery,我想选择一个完全包含某种文本的链接。例如: <p><a>This One</a></p> <p><a>"This One?"</a></p> <p><a>Unlikely</a></p> 我已经试过了: $('a:contains("This One")') 但是它选择了第一个和第二个链接。我只想要第一个链接,其中确切包含“这个”。我怎样才能做到这一点?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.