我需要通过名称和src来查找img。我一直在尝试以下方法无济于事。jQuery:如何通过其src找到图像
var s = $("img[src='/images/greendot.gif'][name='BS']");
的HTML:
<img alt="This item is active." name="BS" src="/images/greendot.gif"/>
VS
<img alt="This item is not active." name="BS" src="/images/spacer.gif"/>
通过名称和来源,你想找到多张图片? – TStamper 2009-05-07 15:41:21
你能发表一个html的例子吗? – Jared 2009-05-07 15:42:55
是的,我是。 s var将是一个我将检查长度的数组。 – kjgilla 2009-05-07 15:43:24