-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
42 lines (38 loc) · 1.79 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
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="stylesheet.css">
<script src="main.js" defer></script>
<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>Calculator</title>
</head>
<body>
<section id="container">
<h1>CALCULATOR</h1>
<label for="field"></label>
<input type="text" name="" id="field" value="" readonly disabled>
<button id="1" onclick="getInputValue('1')">1</button>
<button id="2" onclick="getInputValue('2')">2</button>
<button id="3" onclick="getInputValue('3')">3</button>
<button id="4" onclick="getInputValue('4')">4</button>
<button id="5" onclick="getInputValue('5')">5</button>
<button id="6" onclick="getInputValue('6')">6</button>
<button id="7" onclick="getInputValue('7')">7</button>
<button id="8" onclick="getInputValue('8')">8</button>
<button id="9" onclick="getInputValue('9')">9</button>
<button id="0" onclick="getInputValue('0')">0</button>
<button id="(" onclick="getInputValue('(')">(</button>
<button id=")" onclick="getInputValue(')')">)</button>
<button id="add" onclick="getInputValue('+')">+</button>
<button id="subtract" onclick="getInputValue('-')">-</button>
<button id="multiply" onclick="getInputValue('*')">*</button>
<button id="divide" onclick="getInputValue('/')">/</button>
<button id="pow" onclick="getInputValue('**')">pow</button>
<button id="submit" onclick="calculateAll();">calculate</button>
<button id="clear" onclick="clearAll('field')">clear</button>
<br>
</section>
</body>
</html>