在tr的数组中通过属性查找某个tr [英] finding a certain tr by attribute in an array of tr's

查看:251
本文介绍了在tr的数组中通过属性查找某个tr的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在tr的数组中找到一个tr 属性名称为docId

是否有任何这种类型的jquery选择器?

我不想使用for循环遍历整个数组 然后自己找到它.

除非您会说我别无选择...

谢谢

解决方案

如果您已经有了trs数组,并且已通过jquery选择器获取了它们

array.filter('tr[attr=val]')

可能就是您所需要的.

hi im trying to find a tr inside an array of tr's the attribute name is docId

is there anykind of jquery selector for this?

i dont want to just iterate throught the array with a for loop and find it myself.

unlesss you will say i have no choice...

thank you

解决方案

if you already have the array of trs on hand, and you got them through a jquery selector

array.filter('tr[attr=val]')

may be what you need.

这篇关于在tr的数组中通过属性查找某个tr的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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