-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
47 lines (43 loc) · 1.94 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
47
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Calculator</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<div class="title">
<h1>Calculator</h1>
</div>
<div class="wrap">
<form name ="cal">
<input type="text" name="display">
<br><br>
<input type="Button" value="9" onclick="cal.display.value+='9'" >
<input type="Button" value="8" onclick="cal.display.value+='8'" >
<input type="Button" value="7" onclick="cal.display.value+='7'" >
<input type="Button" value="+" onclick="cal.display.value+='+'" >
<br><br>
<input type="Button" value="6" onclick="cal.display.value+='6'" >
<input type="Button" value="5" onclick="cal.display.value+='5'" >
<input type="Button" value="4" onclick="cal.display.value+='4'" >
<input type="Button" value="-" onclick="cal.display.value+='-'" >
<br><br>
<input type="Button" value="3" onclick="cal.display.value+='3'" >
<input type="Button" value="2" onclick="cal.display.value+='2'" >
<input type="Button" value="1" onclick="cal.display.value+='1'" >
<input type="Button" value="*" onclick="cal.display.value+='*'" >
<br><br>
<input type="Button" value="0" onclick="cal.display.value+='0'" >
<input type="Button" value="/" onclick="cal.display.value+='/'" >
<input type="Button" value="%" onclick="cal.display.value+='%'" >
<input type="Button" value="=" onclick="cal.display.value=eval(cal.display.value)">
<br><br>
<input type="Button" value="DELETE" onclick="cal.display.value= ''" id="del" >
</form>
</div>
</header>
</body>
</html>