如何在30天后更改表格行的颜色 [英] how to change the color of a table row after 30 days
本文介绍了如何在30天后更改表格行的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要根据日期形式的一个列值更改表格行的颜色(例如:10-sep-2014),现在我需要更改那些特定行的颜色超过30或31或28,即按月数。我写了通过使用jquery从变量中获取db的所有日期,如下所示。
i need to change the color of a table row based on one column values which are in the form of dates(say: 10-sep-2014), now i need to change the color of those particular rows which are exceeding 30 or 31 or 28 i.e according to months days. i have written to get all dates from db in a variable by using jquery as follows.
$('#tablebody').find('tr').each(function () {
var actualdate = $(this).find('td').eq(0).text().trim();
});
from this how to check my condition, please help me to solve this....
推荐答案
(' #tablebody')。find(' tr')。each(function(){
var actualdate =
('#tablebody').find('tr').each(function () { var actualdate =
( this )。find(' td')。eq ( 0 )。text()。trim();
});
来自 这个如何查看我的情况,请帮我解决 this ....
(this).find('td').eq(0).text().trim(); }); from this how to check my condition, please help me to solve this....
检查这个...
http://stackoverflow.com/ questions / 14439471 / jquery-function-to-compare-date-with-current-date [ ^ ]
Check this...
http://stackoverflow.com/questions/14439471/jquery-function-to-compare-date-with-current-date[^]
这篇关于如何在30天后更改表格行的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文