-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcalculator.html
More file actions
49 lines (46 loc) · 2.1 KB
/
calculator.html
File metadata and controls
49 lines (46 loc) · 2.1 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
<html>
<head>
<link rel="stylesheet" href="cal.css">
<title>Calculator</title>
</head>
<body>
<h1>
Online Calculator
</h1>
<h2>
By:- Emmanuel Garikina
</h2>
</body>
<form name="form1" class="calc" action="calculator.html" method="POST">
<input type="text" name="answer" id="display">
<br>
</br>
<input type="button" class="btnDesign" value="C" onclick="form1.answer.value=''">
<input type="button" class="btnDesign" value="<" onclick="form1.answer.value=form1.answer.value.substring(0,form1.answer.value.length*1-1)">
<input type="button" class="btnDesign" value="00" onclick="form1.answer.value+='00'">
<input type="button" class="btnDesign" value="/" onclick="form1.answer.value+='/'">
<br>
</br>
<input type="button" class="btnDesign" value="7" onclick="form1.answer.value+='7'">
<input type="button" class="btnDesign" value="8" onclick="form1.answer.value+='8'">
<input type="button" class="btnDesign" value="9" onclick="form1.answer.value+='9'">
<input type="button" class="operatorDesign" value="*" onclick="form1.answer.value+='*'">
<br>
</br>
<input type="button" class="btnDesign" value="4" onclick="form1.answer.value+='4'">
<input type="button" class="btnDesign" value="5" onclick="form1.answer.value+='5'">
<input type="button" class="btnDesign" value="6" onclick="form1.answer.value+='6'">
<input type="button" class="operatorDesign" value="-" onclick="form1.answer.value+='-'">
<br>
</br>
<input type="button" class="btnDesign" value="1" onclick="form1.answer.value+='1'">
<input type="button" class="btnDesign" value="2" onclick="form1.answer.value+='2'">
<input type="button" class="btnDesign" value="3" onclick="form1.answer.value+='3'">
<input type="button" class="operatorDesign" value="+" onclick="form1.answer.value+='+'">
<br>
</br>
<input type="button" id="zero" value="0" onclick="form1.answer.value+='0'">
<input type="button" class="btnDesign" value="." onclick="form1.answer.value+='.'">
<input type="button" class="operatorDesign" value="=" onclick="form1.answer.value=eval(form1.answer.value)">
</form>
</html>