From bc3bcd9f076a4e3005fdcb4b9f189f0a962248ef Mon Sep 17 00:00:00 2001 From: Raymond Yang Date: Thu, 29 Jun 2023 09:42:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=AE=8A=E6=95=B8=E5=AE=A3?= =?UTF-8?q?=E5=91=8A=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/index.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/js/index.js b/js/index.js index 67ee604..9931c91 100644 --- a/js/index.js +++ b/js/index.js @@ -15,6 +15,9 @@ if (localStorage.getItem('temp_date') !== null) { dateInput.value = formattedDate; } +let table = document.createElement("table"); +let thead = document.createElement("thead"); +let tbody = document.createElement("tbody"); generateTable(); getDateOfRecords(); @@ -22,10 +25,6 @@ getDateOfRecords(); setInterval(getDateOfRecords, 2000); function generateTable() { - let table = document.createElement("table"); - let thead = document.createElement("thead"); - let tbody = document.createElement("tbody"); - table.appendChild(thead); table.appendChild(tbody);