-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
54 lines (52 loc) · 2.42 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>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="main.css">
<title>JS Calculator</title>
</head>
<body>
<h1>JS Calculator</h1>
<div id='calculator'>
<form>
<input type='text' id='display' disabled>
<br>
<input type='button' value='C' id='keys' onclick='toScreen("c")'>
<input type='button' value='CE' id='keys' onclick='backspace()'>
<input type='button' value='x^2' id='keys' onclick='power()'>
<input type='button' value='+' id='keys' onclick='toScreen("+")'>
<br>
<input type='button' value='9' id='keys' onclick='toScreen("9")'>
<input type='button' value='8' id='keys' onclick='toScreen("8")'>
<input type='button' value='7' id='keys' onclick='toScreen("7")'>
<input type='button' value='-' id='keys' onclick='toScreen("-")'>
<br>
<input type='button' value='6' id='keys' onclick='toScreen("6")'>
<input type='button' value='5' id='keys' onclick='toScreen("5")'>
<input type='button' value='4' id='keys' onclick='toScreen("4")'>
<input type='button' value='*' id='keys' onclick='toScreen("*")'>
<br>
<input type='button' value='3' id='keys' onclick='toScreen("3")'>
<input type='button' value='2' id='keys' onclick='toScreen("2")'>
<input type='button' value='1' id='keys' onclick='toScreen("1")'>
<input type='button' value='/' id='keys' onclick='toScreen("/")'>
<br>
<input type='button' value='0' id='keys' onclick='toScreen("0")'>
<input type='button' value='.' id='keys' onclick='toScreen(".")'>
<input type='button' value='=' id='equal' onclick='answer()'>
</form>
<h3>"Once you stop learning, you start dying"</h3>
<h4>Albert Einstein</h4>
</div>
</body>
<script src="main.js"></script>
</html>