-
Notifications
You must be signed in to change notification settings - Fork 0
/
controls.html
42 lines (39 loc) · 1.27 KB
/
controls.html
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
42
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script tyoe="text/javascript">
$(document).ready(function(){
$('#clickON').click(function(){
var a = new XMLHttpRequest();
a.open("GET","pinon.php");
a.onreadystatechange=function(){
if(a.readyState==4){
if(a.status == 200){
}
}
}
a.send();
});
$('#clickOFF').click(function(){
var a = new XMLHttpRequest();
a.open("GET","pinoff.php");
a.onreadystatechange=function(){
if(a.readyState==4){
if(a.status == 200){
}
}
}
a.send();
});
});
</script>
<title>Pi Controller</title>
</head>
<body>
<p>V1.0</p>
<button type="button" id="clickON">ON</button>
<button type="button" id="clickOFF">OFF</button>
</body>
</html>