/
AmoFess
/
TableLiftController
Обзор
Документация
Войти
/
AmoFess
/
TableLiftController
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
data/index.html
60 строк
3 KB
BlackWarriorNT
подключил библиотеку AsyncElegantOTA
12 янв 2022, 06:50
12 янв 2022, 06:50
9f156da
Код
Авторство
О чём код?
<html lang='ru'> <head> <meta http-equiv='content-type' content='text/html; charset=utf-8'> <link rel="stylesheet" type="text/css" href="styles.css"> <link rel="icon" type="image/png" href="favico16.png" sizes="16x16"> <link rel="icon" type="image/png" href="favico32.png" sizes="32x32"> <link rel="apple-touch-icon" href="favic180.png"> </head> <body> <div class="panelMain contentMain"> <div class="dev_uptime header"> <span style="float:left; font-size: 75%%; vertical-align: top; padding: 5px;"> Время работы<br><span id="uptime">%WTIME%</span> </span> </div> <div class="dev_title header"><span style="font-size: 200%%;">Умный стол</span></div> <div class="dev_info header"> <span style="float:right; font-size: 75%%; vertical-align: top; padding: 5px;"> <span id="rssi">%RSSI%</span> dBi<br> <span id="vcc">%VCC%</span> V </span> </div> <div class="dev_curHeight heightInfo text-vertical-al"><span style="float: right;"><p><span id="height">%HEIGHT%</span><span style="font-size: 50%;">cm</span></p></span></div> <div class="buttonUp centerContent"><button class="btnArrow" onmousedown="moveLift(1)" onmouseup="moveLift(0)">🡹</button></div> <div class="buttonDown centerContent"><button class="btnArrow" onmousedown="moveLift(-1)" onmouseup="moveLift(0)">🡻</button></div> <div class="dev_modes centerContent"> <div><a href="setLiftMin"><button class="btnSelect" style="width: 40px;">⤓</button></a></div> <div><a href="setLiftMode1"><button class="btnSelect">Режим 1</button></a></div> <div><a href="setLiftMode2"><button class="btnSelect">Режим 2</button></a></div> <div><a href="setLiftMax"><button class="btnSelect" style="width: 40px;">⤒</button></a></div> </div> <div class="buttonConfig centerContent"><a href="config.html"><button class="btnSelect">Настройки</button></a></div> </div> </body> </html> <script> setInterval(function() { getInfo("uptime"); getInfo("height"); getInfo("vcc"); getInfo("rssi"); }, 1000); function moveLift(val) { var xhr = new XMLHttpRequest(); xhr.open("POST", "/moveLift?height="+val, true); xhr.send(); } function getInfo (page) { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById(page).innerHTML = this.responseText; } }; xhttp.open("GET", "/"+page, true); xhttp.send(); } </script>