jQuery:选择器问题(图像)

时间:2010-03-04 02:50:17

标签: jquery selector

我有一个HTML文档,其中包含本地文件的图像,如:

<img src="file:///C:/...

如何在src标签中选择file://的所有图像?

2 个答案:

答案 0 :(得分:10)

您正在寻找Attribute-starts-with selector

例如:

$('img[src^="file://"]')

答案 1 :(得分:2)

使用Attribute Starts With Selector

$('img[src^=file:///]')