dongyin4202 2015-04-09 11:20
浏览 21
已采纳

基于单元格值在3种不同的背景颜色之间进行切换,但仅限于另一个调用值不同于

I was helped along a while back with some code for changing background color in a table cell; the final solution works very well: change between 3 different background color based on cell value

Now I'd like to add another condition for this, please take a look here to see what I mean: unable to post link: jsfiddle dot net/Bouncer/LeyqceLe/4/

Is this at all possible without loosing the current function?

  • 写回答

3条回答 默认 最新

  • doutonghang2761 2015-04-09 11:28
    关注

    Here it is my friend: jsFiddle

    It gets the value of avai :

    var diff = $('td.avai').html();
    

    then checks if the value of the avai cell is other than 20, and skips the cell colouring:

    if(diff != 20) {    ...    }
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?