function te (){
let da = new Date() //获取当前的时间
let star = da.getTime() //获取毫秒
// console.log(star);
let da1 = new Date("2022-09-12 18:00:00")
let stop = da1.getTime()
// console.log(stop);
// 获取秒数
let time = (stop - star) / 1000
// console.log(time);
let d = parseInt(time/60/60/24) //获取天数
d = d<10?'0'+d:d
let h = parseInt(time / 60 / 60 % 24) //获取小时
h = h < 10 ? '0' + h : h
let m = parseInt(time / 60 % 60) //获取分钟
m = m < 10 ? '0' + m : m
let s = parseInt(time % 60) //获取秒数
s = s < 10 ? '0' + s : s
let spans = document.getElementsByTagName("span")
spans[0].innerHTML = d
spans[2].innerHTML = h
spans[4].innerHTML = m
spans[6].innerHTML = s
}
setInterval('te()',1000)