Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
100 lines (94 loc) · 2.45 KB
/
Copy pathindex.html
File metadata and controls
100 lines (94 loc) · 2.45 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<html>
<head>
<script src="script.js"></script>
<style>
table,
th,
td,
input {
border: 3px solid palevioletred;
}
button {
background-color: pink;
color: blueviolet;
padding: 8px 8px;
text-align: center;
display: inline-block;
font-size: 12px;
font-weight: bolder;
margin: 2px 2px;
cursor: pointer;
width: 30px;
}
input {
color: blueviolet;
font-size: 16px;
font-weight: bolder;
width: 182px;
height: 40px;
background-color: rgb(233, 184, 208);
text-align: right;
}
</style>
</head>
<body>
<input id="display" disabled>
<table>
<tr>
<td>
<button onclick="setNumber(7)">7</button>
</td>
<td>
<button onclick="setNumber(8)">8</button>
</td>
<td>
<button onclick="setNumber(9)">9</button>
</td>
<td>
<button onclick="setOperation('Multiplication')">x</button>
</td>
</tr>
<tr>
<td>
<button onclick="setNumber(4)">4</button>
</td>
<td>
<button onclick="setNumber(5)">5</button>
</td>
<td>
<button onclick="setNumber(6)">6</button>
<td>
<button onclick="setOperation('Division')">/</button>
</td>
</tr>
</tr>
<tr>
<td>
<button onclick="setNumber(1)">1</button>
</td>
<td>
<button onclick="setNumber(2)">2</button>
</td>
<td>
<button onclick="setNumber(3)">3</button>
</td>
<td>
<button onclick="setOperation('Add')">+</button>
</td>
</tr>
<tr>
<td>
<button onclick="setNumber(0)">0</button>
</td>
<td>
<button onclick="clearResult()">C</button>
</td>
<td>
<button onclick="setEqual()">=</button>
</td>
<td>
<button onclick="setOperation('Substraction')">-</button>
</td>
</tr>
</body>
</html>