-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaction2symbol.html
53 lines (51 loc) · 1.22 KB
/
action2symbol.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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
</head>
<body>
<a href= "index.html">home</a>
<table>
<tr>
<td>action sequence in:</td>
<td>
<input id = "actioninput"/>
</td>
</tr>
<tr>
<td>symbol sequence out:</td>
<td>
<input id = "symbolinput"/>
</td>
</tr>
</table>
<script>
document.getElementById("actioninput").value = "";
document.getElementById("symbolinput").value = "";
document.getElementById("actioninput").select();
document.getElementById("actioninput").onchange = function(){
symbolglyph = "";
actionglyph = this.value;
actionsequence = actionglyph.split(",");
for(var index = 0;index < actionsequence.length;index++){
if(actionsequence[index].length > 0){
actionint = parseInt(actionsequence[index],8);
symbolint = actionint + 01000;
symbolglyph += "0" + symbolint.toString(8) + ",";
}
}
document.getElementById("symbolinput").value = symbolglyph;
}
</script>
<style>
#actioninput{
border:solid;
border-color:blue;
}
#actioninput{
border:solid;
border-color:red;
}
</style>
</body>
</html>