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;';
}
}
});
EasyUI 行背景变色

本文介绍如何使用 EasyUI 的 rowStyle 函数为表格中剩余天数少于5天的行设置红色背景,适用于 customerdg 页面中的 table 标签。

被折叠的 条评论
为什么被折叠?



