ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
### 距离当晚24点之前倒计时 ~~~ // 距离今晚24:0:0的倒计时 var endYear=new Date().getFullYear(); var endMonth=new Date().getMonth()+1; var endDay=new Date().getDate(); var endTime=new Date(endYear,endMonth,endDay); function leftDiv (){ var Time = endTime-(new Date().getTime()); var Hours = addNumber(Math.floor(Time/1000/60/60%24)); var Minutes = addNumber(Math.floor(Time/1000/60%60)); var Seconds = addNumber(Math.floor(Time/1000%60)); if(Time>0){ setTimeout(function(){ leftDiv(); },1000); }else{ clearTimeout(leftDiv()) } document.getElementById("divTime").innerText=Hours+":"+Minutes+":"+Seconds; } leftDiv(); function addNumber(num){ var num=(num>9)?num:('0'+num); return num; } ~~~