Initial Commit
This commit is contained in:
27
html/index.html
Normal file
27
html/index.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<header>
|
||||
<title>Rod Biren</title>
|
||||
</header>
|
||||
|
||||
<body>
|
||||
<p id="console"> Why Hello There</p>
|
||||
<button id="update" type="button" onclick="update()">Update</button>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
let update_button = document.getElementById("update")
|
||||
let console = document.getElementById("console")
|
||||
|
||||
update_button.addEventListener("click",update)
|
||||
|
||||
async function update() {
|
||||
update_button.disabled = true
|
||||
console.innerText = "Updating"
|
||||
let resp = await fetch("/api/update")
|
||||
let body = await resp.text()
|
||||
console.innerText = body
|
||||
update_button.disabled = false
|
||||
}
|
||||
</script>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user