查找和过滤器之间的区别 [英] Difference between find and filter

查看:71
本文介绍了查找和过滤器之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近进入了jQuery世界.我看到了方法find()filter(),但无法弄清两者之间的区别.

I have recently jumped into the world of jQuery. I saw the methods find() and filter() but can not figure out the difference between the two.

两者之间到底有什么区别?

What exactly is the difference between the two?

推荐答案

过滤器减少了已经匹配的元素,而找到会获取匹配元素的后代.

filter reduces the set of already matched elements, while find gets descendants of the matched element.

这篇关于查找和过滤器之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆