From d1732c36d189b2a7fe45fd377bc0b5f203d9f559 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BF=9B=E5=87=BB=E7=9A=84Creeper?= Date: Wed, 29 Oct 2025 09:30:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=20script.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script.js | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 script.js diff --git a/script.js b/script.js deleted file mode 100644 index 11c9a1e..0000000 --- a/script.js +++ /dev/null @@ -1,42 +0,0 @@ -const days = document.getElementById('days'), - hours = document.getElementById('hours'), - minutes = document.getElementById('minutes'), - seconds = document.getElementById('seconds'); - -const dd = document.getElementById('dd'), - hh = document.getElementById('hh'), - mm = document.getElementById('mm'), - ss = document.getElementById('ss'); - - -const day_dot = document.querySelector('.day_dot'), - hr_dot = document.querySelector('.hr_dot'), - min_dot = document.querySelector('.min_dot'), - sec_dot = document.querySelector('.sec_dot'); - - -const endDate = '03/08/2026 00:00:00'; - -// date format mm/dd/yyyy - -const x= setInterval(()=>{ - const now = new Date(endDate).getTime(); - const countDown = new Date().getTime(); - const distance = now - countDown; - - // 时间计算 for dats, hours, minutes and seconds - let d = Math.floor(distance / (1000 * 60 * 60 * 24)); - let h = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); - let m = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); - let s = Math.floor((distance % (1000 * 60)) / (1000)); - - // output the result in element with id - days.innerHTML = d + "
Days" - - // animate stroke - dd.style.strokeDashoffset = 440 - (440 * d) / 365; -}) - - - -