倒计时天数多了一个月啊,输入当天日期,出来是31天
var newTime = new Date();
var endTime = new Date(2015,1,19);
var leftTime = ((endTime.getTime() - newTime.getTime())/(1000*60*60*24));
alert(Math.ceil(leftTime));
var newTime = new Date();
var endTime = new Date(2015,1,19);
var leftTime = ((endTime.getTime() - newTime.getTime())/(1000*60*60*24));
alert(Math.ceil(leftTime));
2015-01-19
举报