扫码关注官方订阅号
例如:
$('ul').find('li.a').操作;
这样很容易,如何利用find找.text('a')的p呢?
$('body').find(????);
ringa_lee
用filter$('body').filter(function(){ return $(this).text() === 'a';})
$('body').filter(function(){ return $(this).text() === 'a';})
http://www.w3school.com.cn/jquery/traversing_filter.asp
http://www.css88.com/jqapi-1.9/filter/
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
用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/