我通过这样做获取行的索引:
row.parent().children("tr").index(row)
有没有更有效的方法来查找索引?我有数百行,因此我必须选择所有行才能找到索引,这会影响我的性能。
最佳答案
row.prevAll().length
怎么样?
关于javascript - 查找行索引的有效方法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10023807/
我通过这样做获取行的索引:
row.parent().children("tr").index(row)
有没有更有效的方法来查找索引?我有数百行,因此我必须选择所有行才能找到索引,这会影响我的性能。
最佳答案
row.prevAll().length
怎么样?
关于javascript - 查找行索引的有效方法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10023807/