javascript - jQuery find()如何查找text(‘a')的div
ringa_lee
ringa_lee 2017-04-11 11:37:05
0
1
508

例如:

$('ul').find('li.a').操作;

这样很容易,如何利用find找.text('a')的p呢?

$('body').find(????);
ringa_lee
ringa_lee

ringa_lee

reply all(1)
巴扎黑

用filter
$('body').filter(function(){ return $(this).text() === 'a';})

http://www.w3school.com.cn/jquery/traversing_filter.asp

http://www.css88.com/jqapi-1.9/filter/

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!