Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用这个:
$(this).closest('tr').next()
要选择 a table row,但我还需要在此 tr 之后选择具有指定 id 的 tr。
table row
我试过这样做:
var a = $(this).closest('tr').next() var b = $(a).closest('#itemrow').next()
var a工作正常,但它没有选择var b.
var a
var b
这是什么问题?
var a = $(this).closest('tr').nextAll('#itemrow:first')
我想如果你这样做会很好
var a = $(this).closest('tr').next() var b = a.closest('#itemrow').next()
a 已经是一个 jquery 对象,不要用 $() 包围它