-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
94 lines (90 loc) · 5.56 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sintific Calulater</title>
<link rel="stylesheet" href="style.css" class="rel">
<script src="script.js"></script>
</head>
<body>
<form name="sci-calc">
<table class="calculator" cellspacing="0" cellpadding="1">
<tr>
<td colspan="5"><input id="display" name="display" value="0" size="28" maxlength="25"></td>
</tr>
<tr>
<td><input type="button" class="btnTop" name="btnTop" value="C" onclick="this.form.display.value= 0 ">
</td>
<td><input type="button" class="btnTop" name="btnTop" value="<--"
onclick="deleteChar(this.form.display)"></td>
<td><input type="button" class="btnTop" name="btnTop" value="="
onclick="if(checkNum(this.form.display.value)) { compute(this.form) }"></td>
<td><input type="button" class="btnOpps" name="btnOpps" value="π"
onclick="addChar(this.form.display,'3.14159265359')"></td>
<td><input type="button" class="btnMath" name="btnMath" value="%" onclick=" percent(this.form.display)">
</td>
</tr>
<tr>
<td><input type="button" class="btnNum" name="btnNum" value="7"
onclick="addChar(this.form.display, '7')"></td>
<td><input type="button" class="btnNum" name="btnNum" value="8"
onclick="addChar(this.form.display, '8')"></td>
<td><input type="button" class="btnNum" name="btnNum" value="9"
onclick="addChar(this.form.display, '9')"></td>
<td><input type="button" class="btnOpps" name="btnOpps" value="x^"
onclick="if(checkNum(this.form.display.value)) { exp(this.form) }"></td>
<td><input type="button" class="btnMath" name="btnMath" value="/"
onclick="addChar(this.form.display, '/')"></td>
<tr>
<td><input type="button" class="btnNum" name="btnNum" value="4"
onclick="addChar(this.form.display, '4')"></td>
<td><input type="button" class="btnNum" name="btnNum" value="5"
onclick="addChar(this.form.display, '5')"></td>
<td><input type="button" class="btnNum" name="btnNum" value="6"
onclick="addChar(this.form.display, '6')"></td>
<td><input type="button" class="btnOpps" name="btnOpps" value="ln"
onclick="if(checkNum(this.form.display.value)) { ln(this.form) }"></td>
<td><input type="button" class="btnMath" name="btnMath" value="*"
onclick="addChar(this.form.display, '*')"></td>
</tr>
<tr>
<td><input type="button" class="btnNum" name="btnNum" value="1"
onclick="addChar(this.form.display, '1')"></td>
<td><input type="button" class="btnNum" name="btnNum" value="2"
onclick="addChar(this.form.display, '2')"></td>
<td><input type="button" class="btnNum" name="btnNum" value="3"
onclick="addChar(this.form.display, '3')"></td>
<td><input type="button" class="btnOpps" name="btnOpps" value="√"
onclick="if(checkNum(this.form.display.value)) { sqrt(this.form) }"></td>
<td><input type="button" class="btnMath" name="btnMath" value="-"
onclick="addChar(this.form.display, '-')"></td>
</tr>
<tr>
<td><input type="button" class="btnMath" name="btnMath" value="±"
onclick="changeSign(this.form.display)"></td>
<td><input type="button" class="btnNum" name="btnNum" value="0"
onclick="addChar(this.form.display, '0')"></td>
<td><input type="button" class="btnMath" name="btnMath" value="."
onclick="addChar(this.form.display, '.')"></td>
<td><input type="button" class="btnOpps" name="btnOpps" value="x2"
onclick="if(checkNum(this.form.display.value)) { square(this.form) }"></td>
<td><input type="button" class="btnMath" name="btnMath" value="+"
onclick="addChar(this.form.display, '+')"></td>
</tr>
<tr>
<td><input type="button" class="btnMath" name="btnMath" value="("
onclick="addChar(this.form.display, '(')"></td>
<td><input type="button" class="btnMath" name="btnMath" value=")"
onclick="addChar(this.form.display,')')"></td>
<td><input type="button" class="btnMath" name="btnMath" value="cos"
onclick="if(checkNum(this.form.display.value)) { cos(this.form) }"></td>
<td><input type="button" class="btnMath" name="btnMath" value="sin"
onclick="if(checkNum(this.form.display.value)) { sin(this.form) }"></td>
<td><input type="button" class="btnMath" name="btnMath" value="tan"
onclick="if(checkNum(this.form.display.value)) { tan(this.form) }"></td>
</tr>
</tabel>
</form>
</body>
</html>