根据名称过滤jquery结果 [英] filter jquery results based on name
本文介绍了根据名称过滤jquery结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我了解如何根据名称选择元素.相反,如果我已经有了一些选择结果,然后又想查找名称为"bla"的元素而不执行另一个jquery select,该怎么办?
I understand how to select an element based on name. What if instead, I already had some select results, and then wanted to find the element whose name is "bla" without performing another jquery select?
var inputs=$('#dialog-addPoint form').find(':input');
推荐答案
如果您想过滤结果集,而不是运行另一个find()
,则可以使用
If you wanted to filter your result set down, instead of running another find()
, you could use filter()
var filtered = inputs.filter('[name=bla]');
这篇关于根据名称过滤jquery结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文