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                 }

 监听table的复选框的选中和选中取消:

1 if(checkedTable.indexOf(obj.data.fileId) == '-1'){
2                 checkedTable.push(obj.data.fileId)
3             }else{
4                 var arrayIndex = checkedTable.indexOf(obj.data.fileId)
5                 checkedTable.splice(arrayIndex,1)
6             }

 清空select的选中状态:

1  $('.mySystem').val('')
2  form.render('select')

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM