Add files via upload

master
Alan 2021-01-11 08:46:20 +00:00 zatwierdzone przez GitHub
rodzic 499691d1d9
commit de5422cbe5
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 64 dodań i 69 usunięć

Wyświetl plik

@ -1,7 +1,7 @@
// ----------------------------------------------------------------
//
//
// ESP32 / ESp8266 very basic web server demo - 10Jan21
// ESP32 / ESp8266 very basic web server demo - 11Jan21
//
// shows use of AJAX to show updating info on the web page
//
@ -224,7 +224,7 @@ void handleAJAX() {
Serial.println("Ajax page requested from: " + String(cip[0]) +"." + String(cip[1]) + "." + String(cip[2]) + "." + String(cip[3]) );
// ------------------- send the html -------------------
// ---------------------- html ----------------------
client.print (R"=====(
@ -250,9 +250,7 @@ void handleAJAX() {
// ------------------- JavaScript -------------------
client.print (R"=====(
<script>
client.print (R"=====(<script>
function sendData(led) {
var xhttp = new XMLHttpRequest();
@ -280,10 +278,7 @@ void handleAJAX() {
getData();
}, 2000);
</script>
)=====");
</script>)=====");
// --------------------------------------------------
// close html page
@ -295,7 +290,7 @@ void handleAJAX() {
// send data to AJAX web page
// it replies with two items comma seperated: the value in millis and some text
// it replies with two items comma separated: the value in millis and some text
void handleSendData() {
String reply = String(millis()); // item 1
reply += ",";