<script type="text/javascript">

//设置列中字体的颜色,可以根据行索引row和列索index做判断
function setColumnForeColor(value, row, index)
{
return "<span style='color: black'>" + value + "</span>";
}

//设置列单元格的背景颜色,可以根据行索引row和列索index做判断
function setColumnBackColor(value, row, index)
{
return 'background-color: #efefef;';
}
</script>

<!-- 下面是两个列格式化器,styler 管背景,formatter 管字体 -->
<th field="RecNo" styler="setColumnBackColor" formatter="setColumnForeColor"></th>
 
————————————————
版权声明:本文为CSDN博主「长沙三毛」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/hulihui/java/article/details/88380454

相关文章:

  • 2021-09-19
  • 2021-11-19
  • 2021-12-22
  • 2021-07-19
  • 2021-07-24
  • 2022-12-23
  • 2021-12-06
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
  • 2022-01-15
  • 2021-08-25
相关资源
相似解决方案