beautifier_change

This commit is contained in:
Иван Медведев 2023-05-24 19:25:56 +03:00
parent 334d02ebda
commit c8c59e7e62

View File

@ -9,27 +9,28 @@
</head>
<body class="stackedit">
<div class="stackedit__html"><h1 id="состояние-ардуины-отображается-в-браузере"><em>Состояние ардуины отображается в браузере:</em></h1>
<h2 id="ответ-на-hello">ответ на “hello”</h2>
<p>Пришел ответ: <span id="answer1"></span> </p>
<div class="stackedit__html">
<h1 id="состояние-ардуины-отображается-в-браузере"><em>Состояние ардуины отображается в браузере:</em></h1>
<h2 id="ответ-на-hello">ответ на “hello”</h2>
<p>Пришел ответ: <span id="answer1"></span> </p>
<h2 id="состояние-ардуины-равно">Состояние ардуины равно</h2>
<p>Пришел ответ:<span id="answer2"></span></p>
</div>
<script>
fetch('/hello') .then((response) => response.text())
.then((response) => {
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>
<h2 id="состояние-ардуины-равно">Состояние ардуины равно</h2>
<p>Пришел ответ:<span id="answer2"></span></p>
</div>
<script>
fetch('/hello').then((response) => response.text())
.then((response) => {
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>
</html>