-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
46 lines (44 loc) · 4.77 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
<!DOCTYPE html>
<html>
<head>
<title>Stylish Black Calculator</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<font color="#111" face="Arial, sans-serif" size="5"><b>Stylish Black Calculator</b></font>
<div class="calculator">
<input type="text" id="result" readonly>
<table>
<tr>
<td><button onclick="clearResult()">C</button></td>
<td><button onclick="deleteLastCharacter()">D</button></td>
<td><button onclick="appendCharacter('/')">÷</button></td>
<td><button onclick="appendCharacter('7')">7</button></td>
</tr>
<tr>
<td><button onclick="appendCharacter('8')">8</button></td>
<td><button onclick="appendCharacter('9')">9</button></td>
<td><button onclick="appendCharacter('*')">x</button></td>
<td><button onclick="appendCharacter('4')">4</button></td>
</tr>
<tr>
<td><button onclick="appendCharacter('5')">5</button></td>
<td><button onclick="appendCharacter('6')">6</button></td>
<td><button onclick="appendCharacter('-')">-</button></td>
<td><button onclick="appendCharacter('1')">1</button></td>
</tr>
<tr>
<td><button onclick="appendCharacter('2')">2</button></td>
<td><button onclick="appendCharacter('3')">3</button></td>
<td><button onclick="appendCharacter('+')">+</button></td>
<td><button onclick="appendCharacter('0')">0</button></td>
</tr>
<tr>
<td colspan="2"><button onclick="appendCharacter('.')">.</button></td>
<td colspan="2"><button onclick="calculate()">=</button></td>
</tr>
</table>
</div>
<script src="script.js"></script>
</body>
</html>