-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
134 lines (111 loc) · 5.73 KB
/
index.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Weight Converter</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-6 offset-md-3">
<h1 class="display-4 text-center mb-3">Weight Converter</h1>
<form id="myForm">
<!-- Dropdown Start -->
<div class="dropdown">
<button onclick="myFunction()" class="dropbtn">Measurement Of Weight ▾</button>
<div id="myDropdown" class="dropdown-content">
<a onclick="showInput(this.id); getCurrentInput(this.id);" id="lbs" href="#">
Pounds (lbs)
</a>
<a onclick="showInput(this.id); getCurrentInput(this.id);" id="grams" href="#">
Grams (g)
</a>
<a onclick="showInput(this.id); getCurrentInput(this.id);" id="kg" href="#">
Kilograms (Kg)
</a>
<a onclick="showInput(this.id); getCurrentInput(this.id);" id="oz" href="#">
Ounces (oz)
</a>
<a onclick="showInput(this.id); getCurrentInput(this.id);" id="usTon" href="#">
Short Tons (U.S)
</a>
<a onclick="showInput(this.id); getCurrentInput(this.id);" id="gbTon" href="#">
Long Tons (G.B)
</a>
</div>
</div>
<!-- Dropdown End -->
<!-- Input Start -->
<div id="input">
<div class="form-group">
<input id="lbsInput" type="number" class="form-control form-control-lg" placeholder="Enter Pounds...">
</div>
<div class="form-group">
<input id="gramsInput" type="number" class="form-control form-control-lg" placeholder="Enter Grams...">
</div>
<div class="form-group">
<input id="kgInput" type="number" class="form-control form-control-lg" placeholder="Enter Kgs...">
</div>
<div class="form-group">
<input id="ozInput" type="number" class="form-control form-control-lg" placeholder="Enter Ounces...">
</div>
<div class="form-group">
<input id="usTonInput" type="number" class="form-control form-control-lg" placeholder="Enter Short Tons...">
</div>
<div class="form-group">
<input id="gbTonInput" type="number" class="form-control form-control-lg" placeholder="Enter Long Tons...">
</div>
</div>
<!-- Input End -->
</form>
<!-- Output Start -->
<div id="output">
<div id="lbsOutput1" class="card card-warning mb-2">
<div class="card-block">
<h4>Pounds:</h4>
<div id="lbsOutput"></div>
</div>
</div>
<div id="gramsOutput1" class="card card-primary mb-2">
<div class="card-block">
<h4>Grams:</h4>
<div id="gramsOutput"></div>
</div>
</div>
<div id="kgOutput1" class="card card-success mb-2">
<div class="card-block">
<h4>Kilograms:</h4>
<div id="kgOutput"></div>
</div>
</div>
<div id="ozOutput1" class="card card-danger mb-2">
<div class="card-block">
<h4>Ounces:</h4>
<div id="ozOutput"></div>
</div>
</div>
<div id="usTonOutput1" class="card card-warning mb-2">
<div class="card-block">
<h4>Short Tons (US):</h4>
<div id="usTonOutput"></div>
</div>
</div>
<div id="gbTonOutput1" class="card card-primary mb-2">
<div class="card-block">
<h4>Long Tons (GB):</h4>
<div id="gbTonOutput"></div>
</div>
</div>
<!-- Output End -->
</div>
</div>
</div>
<script src="js/dropdown.js"></script>
<script src="js/converter.js"></script>
<script src="js/dropdownInputs.js"></script>
</body>
</html>