0
点赞
收藏
分享

微信扫一扫

jquery实现table tr td重组排序号

孟祥忠诗歌 2022-07-27 阅读 57


//自动重组排序号
function RowIndexInitialize(obj) {
var index = 1;
obj.children("tr:gt(1):not(:last-child)").each(function(i) {
$(this).find("td:eq(0)").html(index++);
});
}

//自动重组排序号使用演示
RowIndexInitialize($(".tbBomItem tbody:first"));

改前:

Row

1

2

4

5

7

8

改后:

Row

1

2

3

4

6

7



举报

相关推荐

0 条评论