diff --git a/assets/js/script.js b/assets/js/script.js index 516498f..86aa84c 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -6,7 +6,7 @@ function date() { month: "long", day: "numeric" }; - let date = currentDate.toLocaleDateString("en-GB", dateOptions); + let date = currentDate.toLocaleDateString("zh-cn", dateOptions); document.getElementById("header_date").innerHTML = date; } @@ -15,16 +15,16 @@ function greet() { let greet = Math.floor(currentTime.getHours() / 6); switch (greet) { case 0: - document.getElementById("header_greet").innerHTML = "Good night!"; + document.getElementById("header_greet").innerHTML = "晚上好!"; break; case 1: - document.getElementById("header_greet").innerHTML = "Good morning!"; + document.getElementById("header_greet").innerHTML = "早上好!"; break; case 2: - document.getElementById("header_greet").innerHTML = "Good afternoon!"; + document.getElementById("header_greet").innerHTML = "下午好!"; break; case 3: - document.getElementById("header_greet").innerHTML = "Good evening!"; + document.getElementById("header_greet").innerHTML = "傍晚好!"; break; } } diff --git a/index.html b/index.html index bf85fda..10760b9 100644 --- a/index.html +++ b/index.html @@ -1,9 +1,9 @@ - + - SUI + 7Wate's Nav - + @@ -17,13 +17,13 @@