-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
41 lines (40 loc) · 2.29 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="" />
<link rel="stylesheet" type="text/css" href="style.css" />
<title>Calculator</title>
<script type="text/javascript" src="script.js" defer></script>
</head>
<body onload="AC()">
<div id="grid">
<div id="output">
<div id="outputTopLine">Calculator</div>
<div id="outputBottomLine"></div>
</div>
<input type="button" value="AC" onclick="AC()" />
<input type="button" value="C" onclick="clearOperand()" />
<input class="button" type="button" value="%" onclick="setOperator(this)" />
<input class="operator" type="button" value="÷" onclick="setOperator(this)" />
<input class="number" type="button" value="7" onclick="getNumber(this)" />
<input class="number" type="button" value="8" onclick="getNumber(this)" />
<input class="number" type="button" value="9" onclick="getNumber(this)" />
<input class="operator" type="button" value="×" onclick="setOperator(this)" />
<input class="number" type="button" value="4" onclick="getNumber(this)" />
<input class="number" type="button" value="5" onclick="getNumber(this)" />
<input class="number" type="button" value="6" onclick="getNumber(this)" />
<input class="operator" type="button" value="-" onclick="setOperator(this)" />
<input class="number" type="button" value="1" onclick="getNumber(this)" />
<input class="number" type="button" value="2" onclick="getNumber(this)" />
<input class="number" type="button" value="3" onclick="getNumber(this)" />
<input class="operator" type="button" value="+" onclick="setOperator(this)" />
<div class="elongatedButtonContainer" style="grid-column: 1/3">
<input class="elongatedButton" type="button" value="0" onclick="getNumber(this)" />
</div>
<input type="button" value="." onclick="addDecimal(this)" />
<input id="equalsign" type="button" value="=" onclick="equals()" />
</div>
</body>
</html>