-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
47 lines (47 loc) · 2.93 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
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" type="text/css" href="/style.css">
<script src="https://unpkg.com/mathjs/dist/math.min.js"></script>
<script src="/index.js" type="text/javascript"></script>
<title>Calculator</title>
</head>
<body>
<div id="app">
<div id="screen">
<h3 id="display-text">0</h3>
</div>
<div id="buttons">
<div class="button-row">
<div class="button-wrapper"><button id="ac" class="light-grey" onclick="acOnClick()">AC</button></div>
<div class="button-wrapper"><button id="plus-minus" class="light-grey" onclick="plusMinusOnClick()">+/-</button></div>
<div class="button-wrapper"><button id="percent" class="light-grey" onclick="percentOnClick()">%</button></div>
<div class="button-wrapper"><button id="divide" class="orange" onclick="divideOnClick()">÷</button></div>
</div>
<div class="button-row">
<div class="button-wrapper"><button id="num7" class="dark-grey" onclick="numberOnClick(this)">7</button></div>
<div class="button-wrapper"><button id="num8" class="dark-grey" onclick="numberOnClick(this)">8</button></div>
<div class="button-wrapper"><button id="num9" class="dark-grey" onclick="numberOnClick(this)">9</button></div>
<div class="button-wrapper"><button id="multiply" class="orange" onclick="multiplyOnClick()">×</button></div>
</div>
<div class="button-row">
<div class="button-wrapper"><button id="num4" class="dark-grey" onclick="numberOnClick(this)">4</button></div>
<div class="button-wrapper"><button id="num5" class="dark-grey" onclick="numberOnClick(this)">5</button></div>
<div class="button-wrapper"><button id="num6" class="dark-grey" onclick="numberOnClick(this)">6</button></div>
<div class="button-wrapper"><button id="minus" class="orange" onclick="subtractionOnClick()">−</button></div>
</div>
<div class="button-row">
<div class="button-wrapper"><button id="num1" class="dark-grey" onclick="numberOnClick(this)">1</button></div>
<div class="button-wrapper"><button id="num2" class="dark-grey" onclick="numberOnClick(this)">2</button></div>
<div class="button-wrapper"><button id="num3" class="dark-grey" onclick="numberOnClick(this)">3</button></div>
<div class="button-wrapper"><button id="plus" class="orange" onclick="additionOnClick()">+</button></div>
</div>
<div class="button-row">
<div id="zero-wrapper" class="button-wrapper"><button id="num0" class="dark-grey" onclick="numberOnClick(this)">0</button></div>
<div class="button-wrapper"><button id="decimal" class="dark-grey" onclick="decimalOnClick()" >.</button></div>
<div class="button-wrapper"><button id="equals" class="orange" onclick="equalsOnClick()">=</button></div>
</div>
</div>
</div>
</body>
</html>