commitTimeDate = new Date("2016/11/9 10:02:40").getTime() + 24*60*60*1000;//截止时间
myDate = new Date();//获取当前时间currentTime=myDate.getTime();//当前时间换成毫秒deadlineTime = commitTimeDate - currentTime;//时间差
let reminderHour = Math.floor(deadlineTime / (1000 * 60 * 60));//倒计时要写的小时let reminderSecond = Math.floor(deadlineTime / (1000 * 60)- reminderHour*60);//倒计时要填的分钟let reminderMinute = Math.floor(deadlineTime / 1000 - reminderSecond*60 - reminderHour*60*60);//倒计时要填的秒
时间: 2024-10-13 01:42:28