-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
120 lines (119 loc) · 5.5 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="keywords" content="base, base converter, number">
<meta name="description" content="Base Converter">
<meta name="author" content="Amirhossein Aliakbarpour">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
<link rel="icon" href="icon.ico">
<title>Base Conversion</title>
</head>
<body>
<h1>Base Conversion</h1>
<br>
<form>
<div class="row" style="text-align: start">
<!-- this div tag is only for page layout -->
<div class="col"></div>
<div class="col-sm-3">
<label class="form-label" for="number">Number:</label>
<input type="text" class="form-control" id="number" placeholder="Example: 123.456">
<p id="error">error</p>
</div>
<div class="col-sm-2">
<label class="form-label" for="fromBase">From base:</label>
<select class="form-select" id="fromBase">
<option value="2">2 - Binary</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8 - Octal</option>
<option value="9">9</option>
<option value="10" selected>10 - Decimal</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16 - Hex</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
<option value="32">32</option>
<option value="33">33</option>
<option value="34">34</option>
<option value="35">35</option>
<option value="36">36</option>
</select>
</div>
<div class="col-sm-2">
<label class="form-label" for="toBase">To base:</label>
<select class="form-select" id="toBase">
<option value="2" selected>2 - Binary</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8 - Octal</option>
<option value="9">9</option>
<option value="10">10 - Decimal</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16 - Hex</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
<option value="32">32</option>
<option value="33">33</option>
<option value="34">34</option>
<option value="35">35</option>
<option value="36">36</option>
</select>
</div>
<!-- this div tag is only for page layout -->
<div class="col"></div>
</div>
</form>
<br>
<button type="button" id="convertBtn" class="row btn btn-primary btn-lg" >Convert</button>
<br><br>
<div class="row" id="resultContainer" style="visibility: hidden;">
<p style="font-size: 20px;margin-top: 10px">Result:</p>
<h4><span id="result">-</span></h4>
</div>
<script src="script.js"></script>
</body>
</html>