-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathcal.html
More file actions
127 lines (107 loc) · 4.34 KB
/
cal.html
File metadata and controls
127 lines (107 loc) · 4.34 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Calculator</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="">
</head>
<style>
body {
background-repeat: no-repeat;
}
.cal {
width: 300px;
margin-left: 630px;
height: 340px;
background: white;
box-shadow: 0px 10px 10px black;
border-radius: 20px;
background-image: url(c.jpg);
}
.table {
padding-top: 30px;
}
table td button {
width: 30px;
}
.div {
width: 40px;
background: black;
color: wheat;
}
textarea {
border-radius: 20px;
font-size: 18px;
}
.operator {
width: 60px;
font-size: 45px;
background: white;
box-shadow: 0px 5px gray;
cursor: pointer;
outline: none;
border-radius: 60px;
}
.number {
width: 50px;
background: white;
border-radius: 10px;
font-size: 25px;
box-shadow: 0px 5px gray;
cursor: pointer;
outline: none;
}
h2 {
font-size: 40px;
font-family: 'Courier New', Courier, monospace
}
</style>
<body>
<br>
<center>
<h2>Calculator</h2>
</center>
<br>
<div class="cal">
<div class="table">
<center>
<form action="" name="Calc" id="myform">
<textarea name="Input" id="" cols="20" rows="4"></textarea>
<table align="center">
<tr>
<td> <input TYPE="button" class="number" NAME="one" VALUE=" 7 " OnClick="Calc.Input.value += '7'"></td>
<td> <input TYPE="button" class="number" NAME="one" VALUE=" 8 " OnClick="Calc.Input.value += '8'"></td>
<td> <input TYPE="button" class="number" NAME="one" VALUE=" 9 " OnClick="Calc.Input.value += '9'"></td>
<td> <input TYPE="button" class="number" NAME="one" VALUE=" / " OnClick="Calc.Input.value += '/'"></td>
</tr>
<tr>
<td> <input TYPE="button" class="number" NAME="one" VALUE=" 4 " OnClick="Calc.Input.value += '4'"></td>
<td> <input TYPE="button" class="number" NAME="one" VALUE=" 5 " OnClick="Calc.Input.value += '5'"></td>
<td> <input TYPE="button" class="number" NAME="one" VALUE=" 6 " OnClick="Calc.Input.value += '6'"></td>
<td> <input TYPE="button" class="number" NAME="one" VALUE=" x " OnClick="Calc.Input.value += '*'"></td>
</tr>
<tr>
<td> <input TYPE="button" class="number" NAME="one" VALUE=" 1 " OnClick="Calc.Input.value += '1'"></td>
<td> <input TYPE="button" class="number" NAME="one" VALUE=" 2 " OnClick="Calc.Input.value += '2'"></td>
<td> <input TYPE="button" class="number" NAME="one" VALUE=" 3 " OnClick="Calc.Input.value += '3'"></td>
<td> <input TYPE="button" class="number" NAME="one" VALUE=" - " OnClick="Calc.Input.value += '-'"></td>
</tr>
<tr>
<td> <input TYPE="button" class="number" NAME="one" VALUE=" 0 " OnClick="Calc.Input.value += '0'"></td>
<td> <input TYPE="button" class="number" NAME="one" VALUE=" + " OnClick="Calc.Input.value += '+'"></td>
<td> <input TYPE="button" class="number" NAME="one" VALUE=" = " OnClick="Calc.Input.value = eval(Calc.Input.value)"></td>
<td> <input TYPE="reset" class="number" NAME="one" VALUE=" C "></td>
</tr>
</form>
</table>
</div>
</div>
<script src="">
function resetForm() {
document.getElementById("myform").reset();
}
</script>
</body>
</html>