-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
51 lines (51 loc) · 2.27 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
48
49
50
51
<!DOCTYPE html>
<html>
<head>
<title>Basic Calculator</title>
<link href="favicon.ico" rel="icon" type="image/x-icon" />
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="index.css">
</head>
<body>
<form name="Calc">
<div class="calculator">
<div class="display">
<input type="text" class="screen" name="Input" id="display" readonly>
</div>
<div class="keypad">
<p>
<input type="button" class="button" value="(" OnClick="Calc.Input.value += '('">
<input type="button" class="button" value=")" OnClick="Calc.Input.value += ')'">
<input type="button" class="button" value="%" OnClick="Calc.Input.value += '%'">
<input type="button" class="button" value="=" OnClick="Calc.Input.value = eval(Calc.Input.value)">
</p>
<p>
<input type="button" class="button" value="9" OnClick="Calc.Input.value += '9'">
<input type="button" class="button" value="8" OnClick="Calc.Input.value += '8'">
<input type="button" class="button" value="7" OnClick="Calc.Input.value += '7'">
<input type="button" class="button" value="/" OnClick="Calc.Input.value += '/'">
</p>
<p>
<input type="button" class="button" value="6" OnClick="Calc.Input.value += '6'">
<input type="button" class="button" value="5" OnClick="Calc.Input.value += '5'">
<input type="button" class="button" value="4" OnClick="Calc.Input.value += '4'">
<input type="button" class="button" value="*" OnClick="Calc.Input.value += '*'">
</p>
<p>
<input type="button" class="button" value="3" OnClick="Calc.Input.value += '3'">
<input type="button" class="button" value="2" OnClick="Calc.Input.value += '2'">
<input type="button" class="button" value="1" OnClick="Calc.Input.value += '1'">
<input type="button" class="button" value="-" OnClick="Calc.Input.value += '-">
</p>
<p>
<input type="button" class="button" value="CE" OnClick="Calc.Input.value = ''">
<input type="button" class="button" value="0" OnClick="Calc.Input.value += '0'">
<input type="button" class="button" value="." OnClick="Calc.Input.value += '.'">
<input type="button" class="button" value="+" OnClick="Calc.Input.value += ' + '">
</p>
</div>
</div>
</form>
</body>
</html>