-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
54 lines (52 loc) · 2.64 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>Project Fundamentals - Basic Calculator</title>
</head>
<body>
<div class="calculator">
<img src="https://images.squarespace-cdn.com/content/v1/5654cf16e4b00b463710ff91/1448509700695-K742MSNI6DLI2EY5JF08/ke17ZwdGBToddI8pDm48kB2JJdSYG6qtFuh5yOgSivBZw-zPPgdn4jUwVcJE1ZvWQUxwkmyExglNqGp0IvTJZUJFbgE-7XRK3dMEBRBhUpw0EQiLagPECDCjHyhXWG6-myvgGXeIWUf4NL6h1C1LKA1Zgs3q42RTRGNGvbZJ9fs/image-asset.png" alt="3 dots" width="30">
<div class="input">
<input type="text" name="formula" id="formula" onfocus="this.value = this.value;" disabled>
<input type="text" name="answer" id="ans" value="0" disabled>
</div>
<div class="buttons">
<table>
<tr>
<th><button class="black" onclick="remOne()">C</button></th>
<th><button id="deleteAll" class="black" onclick="remAll()">CE</button></th>
<th><button class="black" onclick="putOperator('%')">%</button></th>
<th><button class="pink" onclick="putOperator('/')">/</button></th>
</tr>
<tr>
<th><button onclick="putNumber(7)">7</button></th>
<th><button onclick="putNumber(8)">8</button></th>
<th><button onclick="putNumber(9)">9</button></th>
<th><button class="pink" onclick="putOperator('*')">x</button></th>
</tr>
<tr>
<th><button onclick="putNumber(4)">4</button></th>
<th><button onclick="putNumber(5)">5</button></th>
<th><button onclick="putNumber(6)">6</button></th>
<th><button class="pink" onclick="putOperator('-')">-</button></th>
</tr>
<tr>
<th><button onclick="putNumber(1)">1</button></th>
<th><button onclick="putNumber(2)">2</button></th>
<th><button onclick="putNumber(3)">3</button></th>
<th><button class="pink" onclick="putOperator('+')">+</button></th>
</tr>
<tr>
<th><button onclick="putNumber(0)">0</button></th>
<th><button onclick="putNumber('.')">.</button></th>
<th colspan="2"><button id="eq" onclick="equals()">=</button></th>
</tr>
</table>
</div>
</div>
<script src="app.js"></script>
</body>
</html>