-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
90 lines (89 loc) · 3.03 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="index.css" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400&display=swap"
rel="stylesheet"
/>
<title>Basic Calculator</title>
</head>
<body>
<div id="calculator">
<div id="screen">
<div id="expression"></div>
<div id="number">0</div>
</div>
<ul id="touch-pad">
<button id="seven-btn" onclick="calculate(this)">7</button>
<button id="eight-btn" onclick="calculate(this)">8</button>
<button id="nine-btn" onclick="calculate(this)">9</button>
<button
class="operator-btn"
id="clear-btn"
onclick="calculate(this)"
>
C
</button>
<button
class="operator-btn"
id="delete-btn"
onclick="calculate(this)"
>
←
</button>
<button id="four-btn" onclick="calculate(this)">4</button>
<button id="five-btn" onclick="calculate(this)">5</button>
<button id="six-btn" onclick="calculate(this)">6</button>
<button
class="operator-btn"
id="times-btn"
onclick="calculate(this)"
>
×
</button>
<button
class="operator-btn"
id="divide-btn"
onclick="calculate(this)"
>
÷
</button>
<button id="one-btn" onclick="calculate(this)">1</button>
<button id="two-btn" onclick="calculate(this)">2</button>
<button id="three-btn" onclick="calculate(this)">3</button>
<button
class="operator-btn"
id="minus-btn"
onclick="calculate(this)"
>
−
</button>
<button
class="operator-btn"
id="equals-btn"
onclick="calculate(this)"
>
=
</button>
<button id="plusminus-btn" onclick="calculate(this)">
±
</button>
<button id="zero-btn" onclick="calculate(this)">0</button>
<button id="point-btn" onclick="calculate(this)">⋅</button>
<button
class="operator-btn"
id="plus-btn"
onclick="calculate(this)"
>
+
</button>
</ul>
</div>
<script src="index.js"></script>
</body>
</html>