更新Bootstrap表上的颜色单元格

时间:2016-06-05 00:24:09

标签: javascript twitter-bootstrap colors bootstrap-table

我正在使用此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我可以更改当前值...有没有办法更改背景颜色而不是值?

1 个答案:

答案 0 :(得分:0)

您可以为fs.readdir(file, function(error, list)) {<td>标记添加内容相关颜色。您还可以使用style =“....”来内联每个元素的样式。

<td>