网上找了一堆,全是复制粘贴的,不仅没用还浪费时间,自己这边研究了下代码,这样写可以
在表格的回调done里面这样
done: function (res, page, count) {
tr = that.find(".layui-table-box tbody tr[data-index='" + 6+ "']");//这里是指定行,第6行
dyg= tr.children()[6];//这里是指定格子,第6格
dyg.style.backgroundColor= '#颜色';//然后变色
}
这是所有行的指定格变色
done: function (res, page, count) {