-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
61 lines (52 loc) · 2.63 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
55
56
57
58
59
60
61
<!DOCTYPE html>
<html>
<head>
<title>GUI Calculator</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="container">
<form name="form">
<div class="display">
<input type="text" placeholder="0" name="displayResult" />
</div>
<button input="reset" id="r1" value="Reset">X</button>
<a href="" target="__blank">
<img id="gst" src="GST.png">
</a>
<div class="button">
<div class="row">
<input class="btn" type="button" name="b7" value="7" onclick="func(b7.value)">
<input class="btn" type="button" name="b8" value="8" onclick="func(b8.value)">
<input class="btn" type="button" name="b9" value="9" onclick="func(b9.value)">
<input class="btn" type="button" name="plus" value="+" onclick="func(plus.value)">
</div>
<div class="row">
<input class="btn" type="button" name="b4" value="4" onclick="func(b4.value)">
<input class="btn" type="button" name="b5" value="5" onclick="func(b5.value)">
<input class="btn" type="button" name="b6" value="6" onclick="func(b6.value)">
<input class="btn" type="button" name="minus" value="-" onclick="func(minus.value)">
</div>
<div class="row">
<input class="btn" type="button" name="b1" value="1" onclick="func(b1.value)">
<input class="btn" type="button" name="b2" value="2" onclick="func(b2.value)">
<input class="btn" type="button" name="b3" value="3" onclick="func(b3.value)">
<input class="btn" type="button" name="mul" value="*" onclick="func(mul.value)">
</div>
<div class="row">
<input class="btn" type="button" name="b0" value="0" onclick="func(b0.value)">
<input class="btn" type="button" name="bd" value="." onclick="func(bd.value)">
<input class="btn" type="button" name="divv" value="/" onclick="func(divv.value)">
<input class="btn" type="button" value="=" onclick="displayResult.value=eval(displayResult.value)">
</div>
</div>
</form>
</div>
<script>
function func(result) {
form.displayResult.value = form.displayResult.value + result;
}
</script>
</body>
</html>