доделали лабу с автоматическим обновлением!

This commit is contained in:
Софья Сердитова 2023-05-11 19:26:40 +03:00
parent c1d2600f92
commit 3aef5c642d

View File

@ -9,8 +9,20 @@
</head> </head>
<body class="stackedit"> <body class="stackedit">
<div class="stackedit__html"><h1 id="значение-ножки-сейчас--">Значение ножки сейчас -</h1> <div class="stackedit__html"><h1 id="значение-ножки-сейчас--">Значение ножки сейчас - <span id="wertyui"></span></h1>
</div> </div>
<script>
setInterval(()=>
fetch('/pin')
.then((response) => {
return response.json();
})
.then((data) => {
document.getElementById("wertyui").innerHTML = data;
})
, 2000);
</script>
</body> </body>
</html> </html>