beautifier_change
This commit is contained in:
parent
334d02ebda
commit
c8c59e7e62
41
index.html
41
index.html
@ -9,27 +9,28 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="stackedit">
|
<body class="stackedit">
|
||||||
<div class="stackedit__html"><h1 id="состояние-ардуины-отображается-в-браузере"><em>Состояние ардуины отображается в браузере:</em></h1>
|
<div class="stackedit__html">
|
||||||
<h2 id="ответ-на-hello">ответ на “hello”</h2>
|
<h1 id="состояние-ардуины-отображается-в-браузере"><em>Состояние ардуины отображается в браузере:</em></h1>
|
||||||
<p>Пришел ответ: <span id="answer1"></span> </p>
|
<h2 id="ответ-на-hello">ответ на “hello”</h2>
|
||||||
|
<p>Пришел ответ: <span id="answer1"></span> </p>
|
||||||
|
|
||||||
<h2 id="состояние-ардуины-равно">Состояние ардуины равно</h2>
|
<h2 id="состояние-ардуины-равно">Состояние ардуины равно</h2>
|
||||||
<p>Пришел ответ:<span id="answer2"></span></p>
|
<p>Пришел ответ:<span id="answer2"></span></p>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
fetch('/hello') .then((response) => response.text())
|
fetch('/hello').then((response) => response.text())
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
const elem = document.getElementById("answer1");
|
const elem = document.getElementById("answer1");
|
||||||
elem.innerHTML = response;
|
elem.innerHTML = response;
|
||||||
});
|
});
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
fetch('/status') .then((response) => response.text())
|
fetch('/status').then((response) => response.text())
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
const elem = document.getElementById("answer2");
|
const elem = document.getElementById("answer2");
|
||||||
elem.innerHTML = response;
|
elem.innerHTML = response;
|
||||||
}); }, 1000);
|
});
|
||||||
|
}, 1000);
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user