-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscientificCalcLayout.html
More file actions
114 lines (114 loc) · 3.45 KB
/
Copy pathscientificCalcLayout.html
File metadata and controls
114 lines (114 loc) · 3.45 KB
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!DOCTYPE html>
<html>
<head>
<title>Scientific Calculator</title>
<script src="calcLogic.js"></script>
<link rel="stylesheet" type="text/css" href="calcStyling.css">
</head>
<body onload="setup()" onkeydown="addToInputFromKeyboard()">
<table>
<tr>
<td colspan="4">
<input type="text" step="any" disabled="true" id="userInput" />
</td>
</tr>
<tr>
<td colspan="4">
<div contenteditable="true"id="resultInWords" disabled="true"></textarea>
</td>
</tr>
<tr>
<td colspan="3">
<select onchange="selectChange(this)">
<option value="st" onclick="scientificHide()">Standard</option>
<option value="sc" onclick="scientificShow()">Scientific</option>
</select>
</td>
<td>
<input type="button" onclick="clearUserInput()" id="clearBtn" value="C">
</td>
</tr>
<tr>
<td>
<input type="button" onclick="memoryRecall()" id="mrBtn" value="MR">
</td>
<td>
<input type="button" onclick="memoryClear()" id="mcBtn" value="MC">
</td>
<td>
<input type="button" onclick="memoryAdd()" id="mplusBtn" value="M+">
</td>
<td>
<input type="button" onclick="memorySubtract()" id="mminusBtn" value="M-">
</td>
</tr>
<tr>
<td>
<input type="button" onclick="addToInput(this)" id="sevenBtn" value="7">
</td>
<td>
<input type="button" onclick="addToInput(this)" id="eightBtn" value="8">
</td>
<td>
<input type="button" onclick="addToInput(this)" id="nineBtn" value="9">
</td>
<td>
<input type="button" onclick="changeOperator(this)" id="plusBtn" value="+">
</td>
</tr>
<tr>
<td>
<input type="button" onclick="addToInput(this)" id="fourBtn" value="4">
</td>
<td>
<input type="button" onclick="addToInput(this)" id="fiveBtn" value="5">
</td>
<td>
<input type="button" onclick="addToInput(this)" id="sixBtn" value="6">
</td>
<td>
<input type="button" onclick="changeOperator(this)" id="minusBtn" value="-">
</td>
</tr>
<tr>
<td>
<input type="button" onclick="addToInput(this)" id="oneBtn" value="1">
</td>
<td>
<input type="button" onclick="addToInput(this)" id="twoBtn" value="2">
</td>
<td>
<input type="button" onclick="addToInput(this)" id="threeBtn" value="3">
</td>
<td>
<input type="button" onclick="changeOperator(this)" id="multiplyBtn" value="x">
</td>
</tr>
<tr>
<td>
<input type="button" onclick="addToInput(this)" id="zeroBtn" value="0">
</td>
<td>
<input type="button" onclick="addToInput(this)" id="pointBtn" value=".">
</td>
<td>
<input type="button" onclick="changeOperator(this)" id="divideBtn" value="÷">
</td>
<td>
<input type="button" onclick="calculate()" id="equalsbtn" value="=">
</td>
</tr>
<tr id="scientificLine" style="visibility:hidden">
<td colspan="2">
<input type="button" onclick="calcSinCosTan(this)" id="sinBtn" value="sin()">
</td>
<td>
<input type="button" onclick="calcSinCosTan(this)" id="cosBtn" value="cos()">
</td>
<td>
<input type="button" onclick="calcSinCosTan(this)" id="tanBtn" value="tan()">
</td>
</tr>
</table>
</body>
</html>