-
Notifications
You must be signed in to change notification settings - Fork 0
/
class_editor.html
49 lines (48 loc) · 1.51 KB
/
class_editor.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>
Class id generator
</title>
</head>
<body>
<input type="checkbox" onchange="change()" id="wa"><label for="wa">Warrior</label><br />
<input type="checkbox" onchange="change()" id="hu"><label for="hu">Hunter</label><br />
<input type="checkbox" onchange="change()" id="ma"><label for="ma">Mage</label><br />
<input type="checkbox" onchange="change()" id="dr"><label for="dr">Druid</label><br />
<input type="checkbox" onchange="change()" id="pa"><label for="pa">Paladin</label><br />
<input type="checkbox" onchange="change()" id="pr"><label for="pr">Priest</label><br />
<input type="checkbox" onchange="change()" id="ro"><label for="ro">Rogue</label><br />
<input type="checkbox" onchange="change()" id="sh"><label for="sh">Shaman</label><br />
<input type="checkbox" onchange="change()" id="wl"><label for="wl">Warlock</label><br />
<input type="text" id="result" value="0">
<script>
function a(id) {
return (document.getElementById(id).checked);
}
function change() {
var result = 0;
if (a("wa"))
result += 1 << 0;
if (a("hu"))
result += 1 << 1;
if (a("ma"))
result += 1 << 2;
if (a("dr"))
result += 1 << 3;
if (a("pa"))
result += 1 << 4;
if (a("pr"))
result += 1 << 5;
if (a("ro"))
result += 1 << 6;
if (a("sh"))
result += 1 << 7;
if (a("wl"))
result += 1 << 8;
document.getElementById("result").value = result;
}
</script>
</body>
</html>