-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
46 lines (41 loc) · 2.18 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="calculator.css">
<title>calculator</title>
</head>
<div id="jp" class="jumbotron">
<form name="form1" class="calci" action="calculator.html" method="POST">
<input type="text" name="answer" id="display">
<br>
</br>
<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="c" onclick="form1.answer.value=''">
<input type="button" class="operatorDesign" 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>
</div>
<body>
</body>
</html>