-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
54 lines (39 loc) · 2.48 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
<html>
<head>
<title>JavaScript Calculator</title>
<meta content="">
<link href='https://fonts.googleapis.com/css?family=Orbitron' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="calculator">
<div id="screen">
<input id="answer" class="text-right" type="text" name="answer" placeholder="0" disabled/>
</div>
<div id="btns">
<button id="AC" class="btn clearbtn" onclick="getElementById('answer').value=''">AC</button>
<button id="CE" class="btn clearbtn" onclick="getElementById('answer').value=''">CE</button>
<button class="btn" value="/" onclick="operators(this.value)">÷</button>
<button class="btn" value="*" onclick="operators(this.value)">x</button>
<button class="btn" value="7" onclick="getElementById('answer').value+=value">7</button>
<button class="btn"value="8" onclick="getElementById('answer').value+=value">8</button>
<button class="btn" value="9" onclick="getElementById('answer').value+=value">9</button>
<button class="btn" value="-" onclick="operators(this.value)">-</button>
<button class="btn" value="4" onclick="getElementById('answer').value+=value">4</button>
<button class="btn" value="5" onclick="getElementById('answer').value+=value">5</button>
<button class="btn" value="6" onclick="getElementById('answer').value+=value">6</button>
<button class="btn" value="+" onclick="operators(this.value)">+</button>
<button class="btn" value="1" onclick="getElementById('answer').value+=value">1</button>
<button class="btn" value="2" onclick="getElementById('answer').value+=value">2</button>
<button class="btn" value="3" onclick="getElementById('answer').value+=value">3</button>
<button class="btn" value="." onclick="point(this.value)">.</button>
<button id="zero" class="btn" value="0" onclick="zero(this.value)">0</button>
<button id="equal" class="btn" value="=" onclick="eva(this.value)">=</button>
</div>
</div>
<script src="scripts.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</body>
</html>