-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmovement.js
71 lines (71 loc) · 1.29 KB
/
movement.js
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
var xml;
function ToggleLight()
{
xml=new XMLHttpRequest();
xml.open("GET","./ToggleLight.php",false);
xml.send();
var result=xml.responseText;
var btn=document.getElementById("light");
if(result=="0") btn.innerHTML="开灯";
else btn.innerHTML="关灯";
}
function Forward()
{
xml=new XMLHttpRequest();
xml.open("GET","./f.php",false);
xml.send();
}
function Backward()
{
xml=new XMLHttpRequest();
xml.open("GET","./b.php",false);
xml.send();
}
function Straight()
{
xml=new XMLHttpRequest();
xml.open("GET","./s.php",false);
xml.send();
}
function Left()
{
xml=new XMLHttpRequest();
xml.open("GET","./l.php",false);
xml.send();
}
function Right()
{
xml=new XMLHttpRequest();
xml.open("GET","./r.php",false);
xml.send();
}
function LeftLeft()
{
xml=new XMLHttpRequest();
xml.open("GET","./ll.php",false);
xml.send();
}
function RightRight()
{
xml=new XMLHttpRequest();
xml.open("GET","./rr.php",false);
xml.send();
}
function CamMiddle()
{
xml=new XMLHttpRequest();
xml.open("GET","./camm.php",false);
xml.send();
}
function CamLeft()
{
xml=new XMLHttpRequest();
xml.open("GET","./caml.php",false);
xml.send();
}
function CamRight()
{
xml=new XMLHttpRequest();
xml.open("GET","./camr.php",false);
xml.send();
}