1. 程式人生 > >layui:根據行內某個值,設定該行得背景色

layui:根據行內某個值,設定該行得背景色

1  done:function () {
2                     $("table tr").each(function () {
3                         var s = $(this).children().eq(1).text();
4                         console.log(s)
5                         if (s == "caicai")
6                             $(this).css("background","red");
7                             $(this
).css("color","#fff;"); 8 }) 9 }