var d = new Date(); var re = new RegExp(d.getFullYear()+"-0?"+(d.getMonth()+1)+"-0?"+d.getDate()); $.each($('table:eq(1) tr'),function(i){ var ctime = ''; ctime = $(this).children('td').eq(6).text(); if (re.test(ctime)) { $(this).css('background-color','green'); } });