EasyUI条件设置行背景颜色红色显示:
使用EasyUI的rowStyle函数,customerdg对应页面中的table标签的id
<table id="customerdg">
</table>
直接上代码:
//显示剩余天数少于5天,变色
$('#customerdg').datagrid({
rowStyler:function(index,row){
if (row.remainingDays<5&&row.checked==3){
return 'background-color:red;color:blue;font-weight:bold;';
}
}
});