<script>
var starttime = new Date("2018/11/11");
setInterval(function() {
var nowtime = new Date();
var time = starttime - nowtime;
var day = parseInt(time / 1000 / 60 / 60 / 24);
var hour = parseInt(time / 1000 / 60 / 60 % 24);
var minute = parseInt(time / 1000 / 60 % 60);
var seconds = parseInt(time / 1000 % 60);
$('.time').html(day + "天" + hour + "时" + minute + "分" + seconds + "秒");
}, 1200);
</script>
网友评论