-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
68 lines (62 loc) · 4 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Lobster&display=swap" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Calculator</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Calculator</h1>
<div class="card bg-light">
<div class="card-body text-center">
<p class="card-text">
<div class="calculator">
<table>
<tr>
<td><input type="text" id="result"/></td>
</tr>
</table>
<form>
<table>
<tr>
<td ><input id="ac" type="button" value="AC" onclick="clr()"></td>
<td><input id="button" type="button" value="%" onclick="solve('%')"/></td>
<td><input id="button" type="button" value="/" onclick="solve('/')"/></td>
<td><input style="width: 100px; background-color:rgb(245, 227, 72);" id="button" type="button" value="←" onclick="bs()"/></td>
</tr>
<tr>
<td><input id="button" type="button" value="7" onclick="solve('7')"/></td>
<td><input id="button" type="button" value="8" onclick="solve('8')"/></td>
<td><input id="button" type="button" value="9" onclick="solve('9')"/></td>
<td><input id="button" type="button" value="*" onclick="solve('*')"/></td>
</tr>
<tr><td><input id="button" type="button" value="4" onclick="solve('4')"/></td>
<td><input id="button" type="button" value="5" onclick="solve('5')"/></td>
<td><input id="button" type="button" value="6" onclick="solve('6')"/></td>
<td><input id="button" type="button" value="-" onclick="solve('-')"/></td>
</tr>
<tr>
<td><input id="button" type="button" value="1" onclick="solve('1')"/></td>
<td><input id="button" type="button" value="2" onclick="solve('2')"/></td>
<td><input id="button" type="button" value="3" onclick="solve('3')"/></td>
<td><input id="button" type="button" value="+" onclick="solve('+')"/></td>
</tr>
<tr>
<td><input id="button" type="button" value="00" onclick="solve('00')"/></td>
<td><input id="button" type="button" value="0" onclick="solve('0')"/></td>
<td><input id="button" type="button" value="." onclick="solve('.')"/></td>
<td><input id="equals" type="button" value="=" onclick="equalTo()"/></td>
</tr> </div>
</table>
</p>
</div>
</form>
</div>
<script src="script.js"></script>
</body>
</head>
</html>