开发者

JQuery: How to find a tag having some value

开发者 https://www.devze.com 2023-01-02 19:37 出处:网络
In j开发者_开发百科query, it is easy to find input elements having a value like: $(\'input[value=\"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

精彩评论

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

关注公众号