-
Notifications
You must be signed in to change notification settings - Fork 0
/
calc.html
51 lines (50 loc) · 2.4 KB
/
calc.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">
<title>Calcify</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>CALCULATOR</h1>
<div class="mainDiv">
<div class="calc">
<form>
<div class="display">
<input type="text" name="display_screen">
</div>
<div>
<input type="button" value="7" onclick="display_screen.value += '7'">
<input type="button" value="8" onclick="display_screen.value += '8'">
<input type="button" value="9" onclick="display_screen.value += '9'">
<input type="button" value="C" onclick="display_screen.value = del(display_screen.value.toString())">
</div>
<div>
<input type="button" value="4" onclick="display_screen.value += '4'">
<input type="button" value="5" onclick="display_screen.value += '5'">
<input type="button" value="6" onclick="display_screen.value += '6'">
<input type="button" value="AC" onclick="display_screen.value = ''">
</div>
<div>
<input type="button" value="1" onclick="display_screen.value += '1'">
<input type="button" value="2" onclick="display_screen.value += '2'">
<input type="button" value="3" onclick="display_screen.value += '3'">
<input type="button" value="=" onclick="display_screen.value = evaluate1(display_screen.value.toString())">
</div>
<div>
<input type="button" value="+" onclick="display_screen.value += '+'">
<input type="button" value="-" onclick="display_screen.value += '-'">
<input type="button" value="*" onclick="display_screen.value += '*'">
<input type="button" value="/" onclick="display_screen.value += '/'">
</div>
<div class = zdiv>
<input type="button" value="0" onclick="display_screen.value += '0'" class = 'zero'>
</div>
</form>
</div>
</div>
<script src="calc.js"></script>
</body>
</html>