在我的网页,我有日期的表(我的日期格式为DD-MM-YYYY)如何使用jquery根据日期条件更改css?
<tr>
<td>05-03-2012</td>
<td name="expiration">09-07-2012</td>
<td>08-10-2012</td>
<tr>
我想是摆在红色截止日期时,其值是>当前日期,使用Jquery。
所以,我想我会使用这样的:
<script>
//don't know how to retrieve the expiration date and check if it is after the
//current date
$('td[name=expiration]').css({"color":"red"});
</script>
我可以帮你,但我需要知道,如果你的约会甲永远是MM-DD-YYYY – 2012-07-09 01:24:35
好,谢谢!我的日期格式将始终为dd-mm-yyyy,实际上我使用{{object.dateExpiration |日期(d-m-Y)}}来显示此日期。 – Reveclair 2012-07-09 12:52:24