<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
var future = new Date().getTime() + 9000000000
setInterval(() => {
var now = new Date()
var diff = future - now
var days = Math.floor(diff / (1000 * 60 * 60 * 24)); //天数
var hours = Math.floor(diff / (1000 * 60 * 60)); //小时
var mins = Math.floor(diff / (1000 * 60)); //分钟
var secs = Math.floor(diff / 1000); //秒数
var d = days;
var h = hours - days * 24;
var m = mins - hours * 60;
var s = secs - mins * 60;
console.log(hours + ":" + mins + ':' + secs)
}, 1000)
</script>
</body>
</html>
08-22
366
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-21
359
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
05-24