add_setInterval

This commit is contained in:
stud160934 committed 2023-05-24 19:24:22 +03:00
1 parent 6718016a4d
commit 334d02ebda
1 file changed
+3 -1
+3 -1
View File
@@ -22,11 +22,13 @@
const elem = document.getElementById("answer1");
elem.innerHTML = response;
});
setInterval(() => {
fetch('/status') .then((response) => response.text())
.then((response) => {
const elem = document.getElementById("answer2");
elem.innerHTML = response;
});
}); }, 1000);
</script>
</body>