我正在使用此Bootstrap-table插件:http://bootstrap-table.wenzhixin.net.cn/documentation/
该表运作良好。我使用ajax来推送一个json数组。表完成后,我有一个Button。单击此按钮时,它将调用某些函数,并需要更新某些单元格颜色。我是下面的代码示例:
if (condition is tru){
$table.bootstrapTable('updateCell', {
index: 0,
field: 'SrcPath',
value: 'new value'
});
}
使用updateCell
我可以更改当前值...有没有办法更改背景颜色而不是值?
答案 0 :(得分:0)
您可以为fs.readdir(file, function(error, list)) {
和<td>
标记添加内容相关颜色。您还可以使用style =“....”来内联每个元素的样式。
<td>