-
-
Notifications
You must be signed in to change notification settings - Fork 133
/
index.html
73 lines (66 loc) · 2.83 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style.css" />
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous" />
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3"
crossorigin="anonymous"></script>
<style>
.wrp {
overflow-wrap: break-word;
}
</style>
</head>
<body>
<nav class="navbar navbar-dark bg-black">
<a class="navbar-brand Brand" href="#"> NumberSystem Conversion </a>
</nav>
<div class="block">
<h2><span id="textType1">Decimal</span> To <span id="textType2">Binary</span></h2>
<hr>
<strong>From</strong>
<div class="input-group mb-3">
<select id="selectType1" class="form-control" onchange="typeChanged1()">
<option value="Decimal" selected><strong>Decimal</strong></option>
<option value="Binary"><strong>Binary</strong></option>
<option value="Octal"><strong>Octal</strong></option>
<option value="Hex"><strong>Hex</strong></option>
</select>
</div>
<strong>To</strong>
<div class="input-group mb-3">
<select id="selectType2" class="form-control" onchange="typeChanged2()">
<option value="Binary" selected><strong>Binary</strong></option>
<option value="Decimal"><strong>Decimal</strong></option>
<option value="Octal"><strong>Octal</strong></option>
<option value="Hex"><strong>Hex</strong></option>
</select>
</div>
<div class="input-group mb-3">
<input id="num" class="form-control" type="text" name="num" placeholder="Enter Number" autocomplete="off"
autofocus required />
</div>
<strong id="errorMsg" class=""></strong>
<div class="Buttons">
<div class="calculate">
<button onclick="convertTo()" class="btn btn-primary">
Convert
</button>
</div>
<div class="reset">
<button onclick="resetInput()" class="btn btn-primary">
Reset
</button>
</div>
</div>
<h3 class="display-6">The Result is : <span id="output" class="wrp"></span></h3>
</div>
<script type="text/javascript" src="script.js"></script>
</body>
</html>