<script> function DateDiff(end){ today = new Date(); end = new Date(end); if(end > today){ days = parseInt(Math.abs(end - today) / 1000 / 60 / 60 / 24); }else{ days = parseInt(Math.abs(end - today) / 1000 / 60 / 60 / 24); // 如果不限制对比时间和当前时间大小可以不用if } return days; } </script> //输出1 <script>document.write(DateDiff('2006-02-23'));</script> //输出2 <script>document.write(DateDiff('2016-02-23'));</script> //输出N ...
站长微信:xiaomao0055
站长QQ:14496453