-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
44 lines (43 loc) · 1.75 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Calculator</title>
<link rel="stylesheet" href="style.css">
<script src="javascript.js"></script>
</head>
<body>
<div id="container">
<div id="display">
<p>0</p>
</div>
<!-- ROW ONE -->
<button id="grey" onclick="update(1)">1</button>
<button id="grey" onclick="update(2)">2</button>
<button id="grey" onclick="update(3)">3</button>
<button id="orange" onclick="calculate('+')">+</button>
<button id="orange" onclick="calculate('-')">-</button>
<!-- ROW TWO -->
<button id="grey" onclick="update(4)">4</button>
<button id="grey" onclick="update(5)">5</button>
<button id="grey" onclick="update(6)">6</button>
<button id="orange" onclick="calculate('x')">x</button>
<button id="orange" onclick="calculate('/')">/</button>
<!-- ROW THREE -->
<button id="grey" onclick="update(7)">7</button>
<button id="grey" onclick="update(8)">8</button>
<button id="grey" onclick="update(9)">9</button>
<button id="orange" onclick="update('.')">.</button>
<button id="orange" onclick="calculate('%')">%</button>
<!-- ROW FOUR -->
<button id="light" onclick="eraseAll()">AC</button>
<button id="grey" onclick="update(0)">0</button>
<button id="light" onclick="erase()">C</button>
<button id="orange" onclick="negative()">-#</button>
<button id="orange" onclick="operate()">=</button>
</div>
</div>
<footer>
</footer>
</body>
</html>