-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSTENS.html
59 lines (59 loc) · 1.38 KB
/
STENS.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<html>
<head>
<title>Smart-TENS</title>
<script>
var Socket;
function init() {Socket = new WebSocket('ws://' + window.location.hostname + ':81/');
document.getElementById("ip").innerHTML=window.location.hostname;
}
function conventional(){
document.getElementById("mode").innerHTML="Conventional Mode Activated";
Socket.send("conventional");
}
function acupuncture(){
document.getElementById("mode").innerHTML="Acupuncture Mode Activated";
Socket.send("acupuncture");
}
function intense(){
document.getElementById("mode").innerHTML="Intense Mode Activated";
Socket.send("intense");
}
function actstop(){
document.getElementById("mode").innerHTML="Stop Command Activated";
Socket.send("actstop");
}
</script>
</head>
<body onload="javascript:init()">
<h1>Smart TENS Device</h1>
</hr>
<h2> IP of Smart TENS Device </h2>
<p id="ip"> </p>
</hr>
<br>
<h2>Device Mode</h2>
<p id="mode" > </p>
<br>
</hr>
<h2>Select Mode</h2>
</hr>
<br>
<div>
<button id="conventional" onclick="javascript:conventional();">Conventional TENS</button>
</div>
<br>
<div>
<button id="acupuncture" onclick="javascript:acupuncture();">Acupuncture TENS</button>
</div>
<br>
<div>
<button id="Intense" onclick="javascript:intense();">Intense TENS</button>
</div>
<br>
<div>
<h2>Stop Action </h2>
<button id="stop" onclick="javascript:actstop();">Stop</button>
</div>
<br>
</body>
</html>