javascript - 在html表中获取倒数第二个 child td

标签 javascript jquery html css html-table

我可以用这个得到 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/

相关文章:

javascript - Phaser - 在按键释放时?

javascript - Django 中的通用进度条

javascript - 在 `<div>` 中加载图像会覆盖 html 文本

javascript - 通过 JS 带字符串重定向

html - 使用bootstrap使图像垂直和水平居中

javascript - 多次快速单击时,复选框按钮无法正常工作

javascript - 从最新的 rss 中排序日期

php - Yii CJuiDatePicker - 页面上的第二个实例在第一个实例之后未直接打开

javascript - 是否有可能通过多个 JS 脚本影响单个 Angular 应用程序?

html - 在页面的另一侧显示 div