-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
66 lines (52 loc) · 2.48 KB
/
index.html
File metadata and controls
66 lines (52 loc) · 2.48 KB
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
<!DOCTYPE html>
<html>
<head>
<title>
Simple math Calculator
</title>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<table>
<!-- This is the head section of the calculator-->
<tr>
<tr>
<td class="heading"> Simple Math Calculator</td>
</tr>
<td>
<input type="text" id="input" placeholder="0" readonly="readonly">
<input type="text" id="answer" readonly="readonly" style="color: green">
</td>
</tr>
<!-- This the button section of the calculator -->
<tr>
<td>
<input type="button" value="CE" onclick="clearScreen()" style="color: white; background: red">
<input type="button" value="÷" onclick="getOperand('/')">
<input type="button" value="x" onclick="getOperand('x')">
<input type="button" value="←" onclick="backspace()" style="color:red">
<br>
<input type="button" value="1" onclick="getNumber(1)">
<input type="button" value="2" onclick="getNumber(2)">
<input type="button" value="3" onclick="getNumber(3)">
<input type="button" value="+" onclick="getOperand('+')">
<br>
<input type="button" value="4" onclick="getNumber(4)">
<input type="button" value="5" onclick="getNumber(5)">
<input type="button" value="6" onclick="getNumber(6)">
<input type="button" value="-" onclick="getOperand('-')">
<br>
<input type="button" value="7" onclick="getNumber(7)">
<input type="button" value="8" onclick="getNumber(8)">
<input type="button" value="9" onclick="getNumber(9)">
<input type="button" value="()" onclick="getBracket()">
<br>
<input type="button" value="+/-" onclick="getOperand('+/-')">
<input type="button" value="0" onclick="getNumber(0)">
<input type="button" value="=" onclick="compute()" style="width: 120px; color: white; background: green">
</td>
</tr>
</table>
</body>
<script src="javascript.js"></script>
</html>