-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
61 lines (56 loc) · 2.48 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
57
58
59
60
61
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Calculation App</title>
<link rel="stylesheet" href="style.css">
</head>
<body class="light-mode">
<main>
<header class="logo">Calculator</header>
<!-- Header -->
<div class="container">
<p class="js-result"></p>
<section>
<!-- First row -->
<div>
<button onclick="updateCalculation(' ( ')" class="calculator-button">(</button>
<button onclick="updateCalculation(' ) ')" class="calculator-button">)</button>
<button onclick="backspace()" class="calculator-button">←</button>
<button onclick="clearCalculate()" class="calculator-button">AC</button>
</div>
<!-- Second row -->
<div>
<button onclick="updateCalculation(' * ')" class="calculator-button">*</button>
<button onclick="updateCalculation('7')" class="calculator-button">7</button>
<button onclick="updateCalculation('8')" class="calculator-button">8</button>
<button onclick="updateCalculation('9')" class="calculator-button">9</button>
</div>
<!-- Third row -->
<div>
<button onclick="updateCalculation(' - ')" class="calculator-button">-</button>
<button onclick="updateCalculation('4')" class="calculator-button">4</button>
<button onclick="updateCalculation('5')" class="calculator-button">5</button>
<button onclick="updateCalculation('6')" class="calculator-button">6</button>
</div>
<!-- Fouth row -->
<div>
<button onclick="updateCalculation(' + ')" class="calculator-button">+</button>
<button onclick="updateCalculation('1')" class="calculator-button">1</button>
<button onclick="updateCalculation('2')" class="calculator-button">2</button>
<button onclick="updateCalculation('3')" class="calculator-button">3</button>
</div>
<!-- Firth row -->
<div>
<button onclick="updateCalculation(' / ')" class="calculator-button">/</button>
<button onclick="updateCalculation('.')" class="calculator-button">.</button>
<button onclick="updateCalculation('0')" class="calculator-button">0</button>
<button onclick="calculateNumber()" class="calculator-button equal-btn">=</button>
</div>
</section>
</div>
</main>
<script src="script.js"></script>
</body>
</html>