开发者

JQuery: How to find a tag having some value

In j开发者_开发百科query, it is easy to find input elements having a value like:

$('input[value="some value"]');

but how do you find a div with certain value:

<div>Hello There</div>

I tried this but it does not work:

$('div[value="Hello There"]');


Use $('div:contains()').

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜