-
Notifications
You must be signed in to change notification settings - Fork 0
/
Calc.html
107 lines (92 loc) · 2.65 KB
/
Calc.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
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
101
102
103
104
105
106
107
<!DOCTYPE html>
<html lang="en">
<head>
<style>
.grid-container {
display: grid;
grid-template-columns: auto auto auto auto;
background-color: #2196F3;
padding: 10px;
}
.grid-item {
background-color: rgba(255, 255, 255, 0.8);
border: 1px solid rgba(0, 0, 0, 0.8);
padding: 20px;
font-size: 30px;
text-align: center;
}
</style>
<script src="./CalcCode.js">
</script>
</head>
<body>
<h2 align= "right" id= "Res">0</h2>
<h1 align= "right" id="Num">0</h1>
<div class="grid-container">
<div class="grid-item"><button onclick="writeToOutput(1,1)" id="1">
1
</button>
</div>
<div class="grid-item"><button onclick="writeToOutput(1,2)" id="2">
2
</button>
</div>
<div class="grid-item"><button onclick="writeToOutput(1,3)" id="3">
3
</button>
</div>
<div class="grid-item"><button onclick="writeToOutput(1,4)" id="4">
4
</button>
</div>
<div class="grid-item"><button onclick="writeToOutput(1,5)" id="5">
5
</button>
</div>
<div class="grid-item"><button onclick="writeToOutput(1,6)" id="6">
6
</button>
</div>
<div class="grid-item"><button onclick="writeToOutput(1,7)" id="7">
7
</button>
</div>
<div class="grid-item"><button onclick="writeToOutput(1,8)" id="8">
8
</button>
</div>
<div class="grid-item"><button onclick="writeToOutput(1,9)" id="9">
9
</button>
</div>
<div class="grid-item"><button onclick="writeToOutput(1,0)" id="0">
0
</button>
</div>
<div class="grid-item"><button onclick="writeToOutput(2,0)" id="+">
+
</button>
</div>
<div class="grid-item"><button onclick="writeToOutput(3,0)" id="-">
-
</button>
</div>
<div class="grid-item"><button onclick="writeToOutput(4,0)" id="*">
*
</button>
</div>
<div class="grid-item"><button onclick="writeToOutput(5,0)" id="/">
/
</button>
</div>
<div class="grid-item"><button onclick="writeToOutput(6,0)" id="=">
=
</button>
</div>
<div class="grid-item"><button onclick="writeToOutput(7,0)" id="reset">
reset
</button>
</div>
</div>
</body>
</html>