easyui datagrid 隔行变色
一:实现样图
二:实现代码
1 $('#dataGrid').datagrid({ 2 rowStyler:function(index,row){ 3 if (row.adjust_typename=="小计"){ 4 return 'background-color:#D7FFEE;'; 5 }else{ 6 //任务完成100%,1 并且已审核通过,背景色置灰 7 if(row.rownum_ % 2 != 0){ 8 return 'background-color:#d9d9c2;'; 9 } 10 } 11 } 12 });
或者用官方提供的属性值:
——————————————————————————————————————————————————————————————————————————
学问:纸上得来终觉浅,绝知此事要躬行
为事:工欲善其事,必先利其器。
转载请标注出处!

![P97%VEXV2%$JJ84W)ZZGK]I easyui datagrid 隔行变色_其他_02](https://s2.51cto.com/images/blog/202107/14/101c298757b7dd41e8fe7cfe403d328b.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_30,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=/resize,m_fixed,w_1184)

















