-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.h
41 lines (41 loc) · 1.09 KB
/
index.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
const char page[] = R"=====(
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.5" />
<title>Door Button</title>
<style>
body {
background-color: black;
text-align: center;
}
.button {
border-radius: 20px;
border: none;
color: yellow;
background-color: coral;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 20px;
cursor: pointer;
}
</style>
<script>
function sendData() {
var passw = document.getElementById('pass').value; // Value of text for password
var xhttp = new XMLHttpRequest();
xhttp.open("POST", "openDoor?passw="+passw, false);
xhttp.send();
}
</script>
</head>
<body>
<input type="password" id="pass" placeholder="Enter Password">
<br>
<br>
<button class="button" type="submit" onclick="sendData()">Open Door</button>
</body>
</html>
)=====";