Skip to content

Commit e2a94d2

Browse files
committed
fix js
1 parent 7c4c736 commit e2a94d2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

index.html

+6-6
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ <h2>Coming Soon</h2>
4444
</ul>
4545
</section>
4646
<script type="text/javascript">
47-
const countDate = new Date('May 31,2023 00:00:00').getTime();
47+
const countDate = new Date(new Date().getFullYear() + 1, new Date().getMonth()).getTime();
4848

4949
function cd() {
5050
const now = new Date().getTime();
51-
gap = countDate - now;
51+
const gap = countDate - now;
5252
const second = 1000;
5353
const minute = second * 60;
5454
const hour = minute * 60;
@@ -57,10 +57,10 @@ <h2>Coming Soon</h2>
5757
const h = Math.floor((gap % (day)) / (hour));
5858
const m = Math.floor((gap % (hour)) / (minute));
5959
const s = Math.floor((gap % (minute)) / second);
60-
document.getElementById('day').innerText = d;
61-
document.getElementById('hour').innerText = h;
62-
document.getElementById('minute').innerText = m;
63-
document.getElementById('second').innerText = s;
60+
document.getElementById('day').innerText = d.toString();
61+
document.getElementById('hour').innerText = h.toString();
62+
document.getElementById('minute').innerText = m.toString();
63+
document.getElementById('second').innerText = s.toString();
6464
}
6565

6666
setInterval(function () {

0 commit comments

Comments
 (0)