开发者

How to obtain this in jQuery?

开发者 https://www.devze.com 2023-02-01 15:52 出处:网络
I have a bunch of 开发者_Go百科image tags in my HTML page. I want to take count of those images which have the src in it somewhere called warning.png. How to match this pattern and get the count. How

I have a bunch of 开发者_Go百科image tags in my HTML page. I want to take count of those images which have the src in it somewhere called warning.png. How to match this pattern and get the count. How to get in jQuery?

<img src="/images/warning.png?1284446116" alt="Warning">

Thanks


This should work:

$('img[src*="warning.png"]')
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号