我可以使用此代码获取当前行."this"是行中表格单元格中的链接.
$currentTR = $(this).parents('tr');
Run Code Online (Sandbox Code Playgroud)
接下来的两行可以做同样的事情,在当前行之后得到tr.
$nextTR = $(this).parents('tr').next();
$nextTR = $(this).parents('tr').next('tr');
Run Code Online (Sandbox Code Playgroud)
如果我输出,$nextTR.html()我会看到我的期望
我不知道除了类名之外我需要去多少行才能到达正确的行,这样做对我来说不起作用.
$nextTR = $(this).parents('tr').next('.concept');
$nextTR = $(this).parents('tr').next('tr .concept');
Run Code Online (Sandbox Code Playgroud)
我得到的只是空的
docs.Jquery 链接文本上的示例使用此方法
$("p").next(".selected").css("background", "yellow");
Run Code Online (Sandbox Code Playgroud)
我在这里错过了什么?