-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
54 lines (45 loc) · 2.12 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 lang="en" >
<head>
<meta charset="UTF-8">
<title>Created By @satyamshorrf</title>
<meta charset="utf-8">
<meta name="description" content="This is a simple javascript calculator built with HTML, CSS, and vanilla javascript.">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="spacer"></div>
<div id ="calc">
<form>
<input type="text" id="calc-display" disabled>
<br>
<input type="button" value="C" class="keys" onclick="toScreen('C')">
<input type="button" value="÷" class="keys" onclick="toScreen('/')">
<input type="button" value="x" class="keys" onclick="toScreen('*')">
<input type="button" value="SQR" class="keys" onclick="sqr()">
<br>
<input type="button" value="7" class="keys" onclick="toScreen('7')">
<input type="button" value="8" class="keys" onclick="toScreen('8')">
<input type="button" value="9" class="keys" onclick="toScreen('9')">
<input type="button" value="-" class="keys" onclick="toScreen('-')">
<br>
<input type="button" value="4" class="keys" onclick="toScreen('4')">
<input type="button" value="5" class="keys" onclick="toScreen('5')">
<input type="button" value="6" class="keys" onclick="toScreen('6')">
<input type="button" value="+" class="keys" onclick="toScreen('+')">
<br>
<input type="button" value="1" class="keys key2" onclick="toScreen('1')">
<input type="button" value="2" class="keys key2" onclick="toScreen('2')">
<input type="button" value="3" class="keys key2" onclick="toScreen('3')">
<input type="button" value="=" id="equals" class="set" onclick="answer()">
<br>
<input type="button" value="%" class="keys key3" class="bottom" onclick="toScreen('%')">
<input type="button" value="0" class="keys key3" class="bottom" onclick="toScreen('0')">
<input type="button" value="." class="keys key3" class="bottom" onclick="toScreen('.')">
</form>
</div>
<div class="spacer"></div>
<script src="script.js"></script>
</body>
</html>