修正變數宣告位置

This commit is contained in:
Raymond Yang 2023-06-29 09:42:17 +08:00
parent 4d0221e5a9
commit bc3bcd9f07

View File

@ -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);