function sor(){
var timego=new Date("2020-01-24 12:00:00")
var timenow=new Date();//获取当前时间
var time=timego.getTime()-timenow.getTime();//时间戳差的毫秒数
var day=parseInt((time/(1000*60*60*24))%365);//天数
var hour=parseInt((time/(1000*60*60))%24);//时
var min=parseInt((time/(1000*60))%60);//分
var seconds=parseInt((time/1000)%60);//秒
var hm=parseInt(time%1000);//毫秒
var show=document.getElementById("show");
show.innerHTML=day+"天"+hour+":"+min+":"+seconds+":"+hm
}
setInterval(sor,1);
function dat(){
var data=new Date();
var year=data.getFullYear();
console.info();
var mon=data.getMonth();
console.info();
var day=data.getDate();
console.info();
var week=data.getDay();
console.info();
var hour=data.getHours();
console.info();
var min=data.getMinutes();
console.info();
var s=data.getSeconds();
console.info();
var m=data.getMilliseconds();
console.info();
var show=document.getElementById("show");
show.innerHTML=year+"年"+mon+"月"+day+"日"+hour+":"+min+":"+s+":"+m;
// document.write("当前系统时间是:"+year+"年"+mon+"月"+day+"日"+hour+":"+min+":"+s+":"+m);
}
setInterval(dat,1);
var time=10;
function ten(){
time>0?time--:clearInterval(int);
document.getElementById("show");
show.innerHTML=time+"s";
}
var int=setInterval(ten,1000);