customize template

This commit is contained in:
2025-10-20 05:14:06 -07:00
parent 7dd84c77a4
commit 96041e5ce5
16 changed files with 1105 additions and 1736 deletions
+16
View File
@@ -0,0 +1,16 @@
fetch('/message')
.then((resp) => resp.text())
.then((text) => {
const h1 = document.getElementById('heading')!;
h1.textContent = text;
});
const button = document.getElementById("button")!;
button.addEventListener("click", () => {
fetch('/random')
.then((resp) => resp.text())
.then((text) => {
const random = document.getElementById('random')!;
random.textContent = text;
});
});