var div = document.querySelector
(".box");
var timer = setInterval(count, 1)
function count(){
var a = new Date().getTime();
var b = new Date("2019/1/1 00:00:00").getTime();
var arr = b - a;
var one = parseInt(arr / 1000 / 60 / 60 / 24);
var two = parseInt(arr / 1000 / 60 / 60 % 24);
var three = parseInt(arr / 1000 / 60 % 60);
var four = parseInt(arr / 1000 % 60);
one = one < 10 ? "0" + one : one;
two = two < 10 ? "0" + two : two;
three = three < 10 ? "0" + three : three;
four = four < 10 ? "0" + four : four;
div.innerHTML = "今年还剩下" + one + "天" + two + "时" + three + "分" + four + "秒";
}