доделали лабу с автоматическим обновлением!
This commit is contained in:
parent
c1d2600f92
commit
3aef5c642d
14
index.html
14
index.html
@ -9,8 +9,20 @@
|
||||
</head>
|
||||
|
||||
<body class="stackedit">
|
||||
<div class="stackedit__html"><h1 id="значение-ножки-сейчас--">Значение ножки сейчас -</h1>
|
||||
<div class="stackedit__html"><h1 id="значение-ножки-сейчас--">Значение ножки сейчас - <span id="wertyui"></span></h1>
|
||||
</div>
|
||||
<script>
|
||||
setInterval(()=>
|
||||
fetch('/pin')
|
||||
.then((response) => {
|
||||
return response.json();
|
||||
})
|
||||
|
||||
.then((data) => {
|
||||
document.getElementById("wertyui").innerHTML = data;
|
||||
})
|
||||
, 2000);
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user