Changing background cell of table depending on value

前端 未结 4 1415
北海茫月
北海茫月 2020-12-06 17:58

My site reads a XML file that contains information (values) for a data-table. I use CSS to style the table and everything works fine.

To get a better user-experience

4条回答
  •  忘掉有多难
    2020-12-06 18:51

    without loop you can do it this way

    var val="ff";

    $("#grid td:contains('"+val+"')").css('background-color', 'red');

提交回复
热议问题