19

var tt=setInterval(function(){
document.body.innerHTML='';
let target=new Date('2017/11/4/23:59');
let hh=target-new Date();
let cha=Math.floor(hh/1000);
let date=Math.floor(cha/86400);
cha%=86400;
let hour=Math.floor(cha/3600);
cha%=3600;
let minute=Math.floor(cha/60);
cha%=60
let second=cha;
if(hh<=0){
document.write('it is time to contribute my resume');
clearInterval(tt);
}else{
document.write(还剩${date}天${hour}小时${minute}分钟${second}秒);
}
},1000);

你可能感兴趣的:(19)