-
Notifications
You must be signed in to change notification settings - Fork 0
/
cal.html
51 lines (51 loc) · 2.41 KB
/
cal.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="cal.css">
<title>Calculator</title>
</head>
<body>
<center>
<h1>Basic Calculator</h1>
<table class="cal" >
<tr>
<td colspan="4"><input type="text" id="result"></td>
</tr>
<tr>
<td><input type="button" class="assignment" value="AC" onclick="Clear()"></td>
<td><input type="button" class="assignment" value="DEL"onclick="Back()"></td>
<td><input type="button" class="assignment" value="%" onclick="solve('%')"></td>
<td><input type="button" class="assignment" value="/" onclick="solve('/')"></td>
</tr>
<tr>
<td><input type="button" class="key" value="7" onclick="solve('7')"></td>
<td><input type="button" class="key" value="8" onclick="solve('8')"></td>
<td><input type="button" class="key" value="9" onclick="solve('9')"></td>
<td><input type="button" class="assignment" value="x" onclick="solve('*')"></td>
</tr>
<tr>
<td><input type="button" class="key" value="4" onclick="solve('4')"></td>
<td><input type="button" class="key" value="5" onclick="solve('5')"></td>
<td><input type="button" class="key" value="6" onclick="solve('6')"></td>
<td><input type="button" class="assignment" value="-" onclick="solve('-')"></td>
</tr>
<tr>
<td><input type="button" class="key" value="1" onclick="solve('1')"></td>
<td><input type="button" class="key" value="2" onclick="solve('2')"></td>
<td><input type="button" class="key" value="3" onclick="solve('3')"></td>
<td><input type="button" class="assignment" value="+" onclick="solve('+')"></td>
</tr>
<tr>
<td><input type="button" class="key" value="." onclick="solve('.')"></td>
<td><input type="button" class="key" value="0" onclick="solve('0')"></td>
<td><input type="button" class="key" value="00" onclick="solve('00')"></td>
<td ><input type="button" class="equal" value="=" id="equal" onclick="result()"></td>
</tr>
</table>
</center>
<script src="cal.js"></script>
</body>
</html>