-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
52 lines (47 loc) · 2.07 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
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Javascript Calculator</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="container">
<div class="calc-container">
<h1 class="title">JS Calculator</h1>
<input type="text" id="result" />
<div class="btns">
<div>
<button id='7' onclick='fun(this.id)'>7</button>
<button id='8' onclick='fun(this.id)'>8</button>
<button id='9' onclick='fun(this.id)'>9</button>
<button id='/' onclick='fun(this.id)'>/</button>
<button id='*' onclick='fun(this.id)'>*</button>
</div>
<div>
<button id='4' onclick='fun(this.id)'>4</button>
<button id='5' onclick='fun(this.id)'>5</button>
<button id='6' onclick='fun(this.id)'>6</button>
<button id='+' onclick='fun(this.id)'>+</button>
<button id='%' onclick='fun(this.id)'>%</button>
</div>
<div>
<button id='1' onclick='fun(this.id)'>1</button>
<button id='2' onclick='fun(this.id)'>2</button>
<button id='3' onclick='fun(this.id)'>3</button>
<button id='-' onclick='fun(this.id)'>-</button>
<button id='c' onclick='fun(this.id)'>C</button>
</div>
<div>
<button id='ce' onclick='fun(this.id)'>CE</button>
<button id='0' onclick='fun(this.id)'>0</button>
<button id='.' onclick='fun(this.id)'>.</button>
<button id='=' onclick='fun(this.id)' class="twice">=</button>
</div>
</div>
</div>
</div>
</body>
<script src="script.js"></script>
</html>