博客
关于我
layui数据表格偶数行背景颜色
阅读量:172 次
发布时间:2019-02-28

本文共 519 字,大约阅读时间需要 1 分钟。

,limits:[10,20,30,40,50,60,70,80,90],done: function (res, curr, count) {// 表格渲染完成之后的回调    var that = this.elem.next();    res.data.forEach(function (item, index) {        //console.log(item.empName);item表示每列显示的数据        if (index % 2 == 0) {            var tr = that.find(".layui-table-box tbody tr[data-index='" + index + "']").css("background-color", "#fff");        } else {            var tr = that.find(".layui-table-box tbody tr[data-index='" + index + "']").css("background-color", "#f7f7f7");        }    });}})

转载地址:http://mukj.baihongyu.com/

你可能感兴趣的文章
MySQL日期时间函数大全
查看>>
mysql时间相减的问题
查看>>
mysql时间表示和计算
查看>>
MySQL是如何做容器测试的?
查看>>
mysql更改数据库表utf-8_修改mysql数据库为 utf-8
查看>>