-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
56 lines (52 loc) · 2.89 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
52
53
54
55
56
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style.css">
<script src="script.js" async defer></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap" rel="stylesheet">
</head>
<body>
<div class="calculator">
<div class="display">
<div id="word">
<label>Result</label>
</div>
<input id="result" type="text" value="0" dir="rtl" readonly>
<input id="content" type="text" value="" readonly>
</div>
<div class = "clear-del">
<button id="clear" type="button" onclick="resetInput()"> CLEAR </button>
<button id="delete" type="button" onclick="remove()"> DELETE </button>
</div>
<div class = "main">
<div class= "numbers">
<button id="seven" type="button" onclick="addToVariable(7)"> 7 </button>
<button id="eight" type="button" onclick="addToVariable(8)"> 8 </button>
<button id="nine" type="button" onclick="addToVariable(9)"> 9 </button>
<button id="four" type="button" onclick="addToVariable(4)"> 4 </button>
<button id="five" type="button" onclick="addToVariable(5)"> 5 </button>
<button id="six" type="button" onclick="addToVariable(6)"> 6 </button>
<button id="one" type="button" onclick="addToVariable(1)"> 1 </button>
<button id="two" type="button" onclick="addToVariable(2)"> 2 </button>
<button id="three" type="button" onclick="addToVariable(3)"> 3 </button>
<button id="zero" type="button" onclick="addToVariable(0)"> 0 </button>
<button id="dot" type="button" onclick="addToVariable('.')"> . </button>
<button id="eq" type="button" onclick="equals()"> = </button>
</div>
<div class="math">
<button id="divide" type="button" onclick="divide()"> ÷ </button>
<button id="multiply" type="button" onclick="multiply()"> × </button>
<button id="minus" type="button" onclick="minus()"> − </button>
<button id="plus" type="button" onclick="add()"> + </button>
</div>
</div>
</div>
</body>
</html>