我可以用这个得到 td 的最后一个 child
$jq('#stripeTable > tbody > tr:nth-child('+(i+1)+') >td:last-child').text(colValues +" < "+ colValuesWithOverTime);
如何获取 td 的倒数第二个 child ,就像我使用 td:last-child
获取最后一个 child 一样最佳答案
试试 td:nth-last-child(2)。这将选择倒数第二个 child 。
关于javascript - 在html表中获取倒数第二个 child td,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43817825/