-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
51 lines (48 loc) · 2.3 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
<!DOCTYPE HTML>
<html lang="en">
<head>
<title> Simple Calculator </title>
<meta charset="utf-8" />
<meta name="author" content="Ganesan.R" />
<meta name="description" content="simple Calculator using HTML5, CSS3 and JavaScript" />
<meta name="viewport" content="width = device-width, initial-scale = 1.0" />
<!--custom CSS stylesheet-->
<link rel="stylesheet" href="./style.css">
</head>
<body>
<div id="calculator">
<!--Output screen container-->
<div id="output-container">
<input type="text" name="input_box" id="output-display" placeholder="0" />
</div>
<!--buttons container-->
<div id="button-container">
<!--Clear button-->
<button type="button" class="button" id="clear" onClick="clr()">C</button>
<!--Delete button-->
<button type="button" class="button" onClick="del()">DEL</button>
<!--Arithmetic symbols and number button-->
<button type="button" class="button" onClick="display('%')">%</button>
<button type="button" class="button" onClick="display('+')">+</button>
<button type="button" class="button" onClick="display('7')">7</button>
<button type="button" class="button" onClick="display('8')">8</button>
<button type="button" class="button" onClick="display('9')">9</button>
<button type="button" class="button" onClick="display('-')">-</button>
<button type="button" class="button" onClick="display('4')">4</button>
<button type="button" class="button" onClick="display('5')">5</button>
<button type="button" class="button" onClick="display('6')">6</button>
<button type="button" class="button" onClick="display('*')">*</button>
<button type="button" class="button" onClick="display('1')">1</button>
<button type="button" class="button" onClick="display('2')">2</button>
<button type="button" class="button" onClick="display('3')">3</button>
<button type="button" class="button" onClick="display('/')">/</button>
<button type="button" class="button" onClick="display('.')">.</button>
<button type="button" class="button" onClick="display('0')">0</button>
<!--calculate button-->
<button type="button" class="button" onClick="calculate()" id="btn-equal">=</button>
</div>
</div>
<!--Javascript-->
<script src="./script.js"></script>
</body>
</html>