-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdane.js
70 lines (34 loc) · 958 Bytes
/
dane.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
{
let board = document.getElementById("cont");
let changer = document.getElementById("change");
let selector = document.getElementById("selector");
let converter = document.getElementById("conv");
//selector.value = "Kg";
changer.onclick = function()
{
if(selector.selectedIndex == 0)
{
selector.selectedIndex = 1;
}
else if(selector.selectedIndex == 1)
{
selector.selectedIndex = 2
}
else{
selector.selectedIndex = 0;
}
}
converter.onclick = function()
{
if(selector.selectedIndex == 1)
{
let confide = board.value*1000;
board.value = confide;
}
else if(selector.selectedIndex == 2)
{
let confide = board.value*2.20462;
board.value = confide;
}
}
}