<div id="d1" ></div>
<script>
setInterval(function (a,b,c){
var d1 = document.getElementById("d1");
var da = new Date(a,b-1,c).getTime(); //定义时间
var date = new Date().getTime(); //当前时间
var time = Math.floor((da - date)/1000) ; //时间差
var day = Math.floor(time/86400); //天
var h = Math.floor(time%86400/3600); //时
var m = Math.floor(time%3600/60); //分
var s = Math.floor(time%60); //秒
d1.innerHTML = "倒计时:"+day+"天"+h+"时"+m+"分"+s+"秒";
}
,1000,2019,12,25); //到某天的倒计时
</script>