-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
322 lines (320 loc) · 18.7 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="Description" content="Yblui-b" />
<link rel="stylesheet" href="style.css" />
<link rel="shortcut icon" href="favicon.png" />
<link rel="apple-touch-icon" href="favicon.png" />
<link rel="manifest" href="manifest.json" />
<title>Yblui-b - YBLUI.github.io</title>
<meta name="theme-color" content="#fcfcfc" />
</head>
<body onkeyup="ike(event);">
<button id="dha" onclick="$('#mde').style.left = '0';">导航</button>
<h2><strong>科学型</strong></h2>
<div id="mde">
<strong>计算器</strong>
<p class="b sld" id="sci" onclick="chsld(this);">科学型</p>
<p class="b" id="pro" onclick="chsld(this);">程序员</p>
<p class="b" id="tjx" onclick="chsld(this);">统计信息</p>
<p class="b" onclick="chsld(this);" id="rq">日期计算</p>
<strong>转换器</strong>
<p onclick="chsld(this);" class="b">货币</p>
<p onclick="chsld(this);" class="b dwa">容量</p>
<p onclick="chsld(this);" class="b len">长度</p>
<p onclick="chsld(this);" class="b wei">重量</p>
<p onclick="chsld(this);" class="b tem">温度</p>
<p onclick="chsld(this);" class="b ene">能量</p>
<p onclick="chsld(this);" class="b sqr">面积</p>
<p onclick="chsld(this);" class="b spe">速度</p>
<p onclick="chsld(this);" class="b tim">时间</p>
<p onclick="chsld(this);" class="b lyu">功率</p>
<p onclick="chsld(this);" class="b bit">数据</p>
<p onclick="chsld(this);" class="b yal">压力</p>
<p onclick="chsld(this);" class="b dee">角度</p>
<p onclick="$('#about').style.display = 'block';" class="b">关于</p>
</div>
<label>
<input type="text" name="t" id="t" disabled="disabled" value="0"/>
<span id="mxs"></span>
<br />
<p id="prv"></p>
</label>
<p id="tjb"></p>
<p id="tle">计数=0</p>
<pre
id="pre"><code><span id="bis"><span id="fb"><span id="bi1" onclick="cgebi('1');">0</span><span id="bi2" onclick="cgebi('2');">0</span><span id="bi3" onclick="cgebi('3');">0</span><span id="bi4" onclick="cgebi('4');">0</span> <span id="bi5" onclick="cgebi('5');">0</span><span id="bi6" onclick="cgebi('6');">0</span><span id="bi7" onclick="cgebi('7');">0</span><span id="bi8" onclick="cgebi('8');">0</span> <span id="bi9" onclick="cgebi('9');">0</span><span id="bi10" onclick="cgebi('10');">0</span><span id="bi11" onclick="cgebi('11');">0</span><span id="bi12" onclick="cgebi('12');">0</span> <span id="bi13" onclick="cgebi('13');">0</span><span id="bi14" onclick="cgebi('14');">0</span><span id="bi15" onclick="cgebi('15');">0</span><span id="bi16" onclick="cgebi('16');">0</span> </span><span id="fb2"><span id="bi17" onclick="cgebi('17');">0</span><span id="bi18" onclick="cgebi('18');">0</span><span id="bi19" onclick="cgebi('19');">0</span><span id="bi20" onclick="cgebi('20');">0</span> <span id="bi21" onclick="cgebi('21');">0</span><span id="bi22" onclick="cgebi('22');">0</span><span id="bi23" onclick="cgebi('23');">0</span><span id="bi24" onclick="cgebi('24');">0</span> </span><span id="bi25" onclick="cgebi('25');">0</span><span id="bi26" onclick="cgebi('26');">0</span><span id="bi27" onclick="cgebi('27');">0</span><span id="bi28" onclick="cgebi('28');">0</span> <span id="bi29" onclick="cgebi('29');">0</span><span id="bi30" onclick="cgebi('30');">0</span><span id="bi31" onclick="cgebi('31');">0</span><span id="bi32" onclick="cgebi('32');">0</span></span>
<span class="light">31 15 0</span></code>
<input type="button" value="十进制" class="xjz ivt" onclick="ch('dec');" id="dec"><input type="button" value="十六进制" class="xjz" onclick="ch('hex');" id="hex"><input type="button" value="八进制" class="xjz" onclick="ch('oct');" id="oct"><input type="button" value="二进制" class="xjz" onclick="ch('bin');" id="bin">
<input type="button" value="双字" class="xjz ivt" onclick="ch('b1');" id="b1"><input type="button" value="字" class="xjz" onclick="ch('b2');" id="b2"><input type="button" value="字节" class="xjz" onclick="ch('b3');" id="b3"></pre>
<br />
<div class="hie">
<select onchange="rqj(this.selectedIndex);">
<option>日期之间的相隔时间</option>
<option>添加或减去天数</option>
</select>
<br />
开始日期<br />
<input type="date" onchange="cck();" id="startDate" />
<div class="jsa">
<label>
结束日期<br />
<input type="date" onchange="cck();" id="endDate" />
</label>
<br />
差值<br />
<span id="czh"></span>
</div>
<div class="jsa">
<form id="frm">
<label><input type="radio" onclick="cck();" checked="checked" name="radi" id="ad">添加</label>
<label><input type="radio" onclick="cck();" name="radi" id="mi">减去</label>
</form>
<table aria-describedby="frm">
<tr>
<th scope="cell">年</th>
<th scope="cell">月</th>
<th scope="cell">日</th>
</tr>
<tr>
<td><input type="text" onchange="cck();" value="0" id="year" /></td>
<td><input type="text" onchange="cck();" value="0" id="month" /></td>
<td><input type="text" onchange="cck();" value="0" id="day" /></td>
</tr>
</table>
<br />
日期<br />
<span id="jsb"></span>
</div>
</div>
<div class="hie">
<span class="foc" onclick="fo(this);">0</span>
<br />
<select id="select1">
<option class="dwa">毫升</option>
<option class="dwa">立方厘米</option>
<option class="dwa">升</option>
<option class="dwa">立方米</option>
<option class="dwa">茶匙(美制)</option>
<option class="dwa">汤匙(美制)</option>
<option class="dwa">液盎司(美制)</option>
<option class="dwa">杯(美制)</option>
<option class="dwa">品脱(美制)</option>
<option class="dwa">夸脱(美制)</option>
<option class="dwa">加仑(美制)</option>
<option class="dwa">立方英寸</option>
<option class="dwa">立方英尺</option>
<option class="dwa">立方码</option>
<option class="dwa">茶匙(英制)</option>
<option class="dwa">汤匙(英制)</option>
<option class="dwa">液盎司(英制)</option>
<option class="dwa">品脱(英制)</option>
<option class="dwa">夸脱(英制)</option>
<option class="dwa">加仑(英制)</option>
<option class="len">纳米</option>
<option class="len">微米</option>
<option class="len">毫米</option>
<option class="len">厘米</option>
<option class="len">米</option>
<option class="len">公里</option>
<option class="len">英寸</option>
<option class="len">英尺</option>
<option class="len">码</option>
<option class="len">英里</option>
<option class="len">海里</option>
<option class="wei">克拉</option>
<option class="wei">毫克</option>
<option class="wei">厘克</option>
<option class="wei">十分之一克</option>
<option class="wei">克</option>
<option class="wei">十克</option>
<option class="wei">百克</option>
<option class="wei">千克</option>
<option class="wei">公吨</option>
<option class="wei">盎司</option>
<option class="wei">磅</option>
<option class="wei">英石</option>
<option class="wei">短吨(美制)</option>
<option class="wei">长吨(英制)</option>
<option class="tem">摄氏度</option>
<option class="tem">华氏度</option>
<option class="tem">开尔文</option>
<option class="ene">电子伏特</option>
<option class="ene">焦耳</option>
<option class="ene">千焦耳</option>
<option class="ene">热卡路里</option>
<option class="ene">食物卡路里</option>
<option class="ene">英尺磅</option>
<option class="ene">英国热量单位</option>
<option class="sqr">平方毫米</option>
<option class="sqr">平方厘米</option>
<option class="sqr">平方米</option>
<option class="sqr">公顷</option>
<option class="sqr">平方公里</option>
<option class="sqr">平方英寸</option>
<option class="sqr">平方英尺</option>
<option class="sqr">平方码</option>
<option class="sqr">英亩</option>
<option class="sqr">平方英里</option>
<option class="spe">厘米/秒</option>
<option class="spe">米/秒</option>
<option class="spe">英尺/秒</option>
<option class="spe">英里/小时</option>
<option class="spe">节</option>
<option class="spe">马赫</option>
<option class="tim">微秒</option>
<option class="tim">毫秒</option>
<option class="tim">秒</option>
<option class="tim">分钟</option>
<option class="tim">小时</option>
<option class="tim">天</option>
<option class="tim">周</option>
<option class="tim">年</option>
<option class="lyu">瓦特</option>
<option class="lyu">千瓦</option>
<option class="lyu">马力(美制)</option>
<option class="lyu">英尺磅/分钟</option>
<option class="lyu">BTU/分钟</option>
<option class="bit">位</option>
<option class="bit">B</option>
<option class="bit">Kb</option>
<option class="bit">Kib</option>
<option class="bit">kB</option>
<option class="bit">KiB</option>
<option class="bit">Mb</option>
<option class="bit">Mib</option>
<option class="bit">MB</option>
<option class="bit">MiB</option>
<option class="bit">Gb</option>
<option class="bit">Gib</option>
<option class="bit">GB</option>
<option class="bit">GiB</option>
<option class="bit">Tb</option>
<option class="bit">Tib</option>
<option class="bit">TB</option>
<option class="bit">TiB</option>
<option class="bit">Pb</option>
<option class="bit">Pib</option>
<option class="bit">PB</option>
<option class="bit">PiB</option>
<option class="bit">Eb</option>
<option class="bit">Eib</option>
<option class="bit">EB</option>
<option class="bit">EiB</option>
<option class="bit">Zb</option>
<option class="bit">Zib</option>
<option class="bit">ZB</option>
<option class="bit">ZiB</option>
<option class="bit">Yb</option>
<option class="bit">Yib</option>
<option class="bit">YB</option>
<option class="bit">YiB</option>
<option class="yal">大气压</option>
<option class="yal">巴</option>
<option class="yal">千帕</option>
<option class="yal">毫米汞柱</option>
<option class="yal">帕</option>
<option class="yal">磅每平方英寸</option>
<option class="dee">度</option>
<option class="dee">弧度</option>
<option class="dee">百分度</option>
</select>
<br />
<span onclick="fo(this);">0</span>
<br />
<select id="select2">
<!--复制select#select1内容-->
</select>
</div>
<input type="button" value="MC" onclick="calCulate('MC');" />
<input type="button" value="MR" onclick="calCulate('MR');" />
<input type="button" value="M+" onclick="calCulate('M+');" />
<input type="button" value="M-" onclick="calCulate('M-');" />
<br />
<input type="button" value="a" class="ppl" id="sa" onclick="calCulate(this.value);" />
<input type="button" value="b" class="ppl" id="sb" onclick="calCulate(this.value);" />
<input type="button" value="c" class="ppl" id="sc" onclick="calCulate(this.value);" />
<input type="button" value="d" class="ppl" id="sd" onclick="calCulate(this.value);" />
<input type="button" value="e" class="ppl" id="se" onclick="calCulate(this.value);" />
<input type="button" value="f" class="ppl" id="sf" onclick="calCulate(this.value);" />
<br class="ppl" />
<input type="button" value="AC" onclick="calCulate('AC');" />
<input type="button" value="<" onclick="calCulate('<');" />
<input type="button" value="%" onclick="calCulate(this.value);" id="pec" />
<input type="button" value=">" id="exp" onclick="calCulate('>');" />
<input type="button" class="gj" value="√" onclick="calCulate(this.value);" />
<input type="button" class="gj" value="log" onclick="calCulate(this.value);" />
<input type="button" class="gj" value="ln" id="lnb" onclick="calCulate(this.value);" />
<input type="button" class="gj" value="sin" id="sinb" onclick="calCulate(this.value);" />
<input type="button" class="pr" value="RoL" onclick="calCulate(this.value);" />
<input type="button" class="pr" value="RoR" onclick="calCulate(this.value);" />
<input type="button" class="tj" value="F-E" onclick="calCulate(this.value);" />
<input type="button" class="tj" value="Exp" onclick="calCulate(this.value);" />
<br />
<input type="button" value="7" id="s7" onclick="calCulate('7');" />
<input type="button" value="8" id="s8" onclick="calCulate('8');" />
<input type="button" value="9" id="s9" onclick="calCulate('9');" />
<input type="button" value="÷" onclick="calCulate('÷');" id="cus" />
<input type="button" class="gj" value="cos" id="cosb" onclick="calCulate(this.value);" />
<input type="button" class="gj" value="tan" id="tanb" onclick="calCulate(this.value);" />
<input type="button" class="gj" value="Mod" onclick="calCulate(this.value);" />
<input type="button" class="gj" value="Inv" id="inb" onclick="calCulate(this.value);" />
<input type="button" class="pr" value="Or" onclick="calCulate(this.value);" />
<input type="button" class="pr" value="Xor" onclick="calCulate(this.value);" />
<input type="button" class="tj" value="x" onclick="calCulate(this.value);" style="text-decoration: overline;" />
<input type="button" class="tj" value="x^2" onclick="calCulate(this.value);" style="text-decoration: overline;" />
<br />
<input type="button" value="4" id="s4" onclick="calCulate('4');" />
<input type="button" value="5" id="s5" onclick="calCulate('5');" />
<input type="button" value="6" id="s6" onclick="calCulate('6');" />
<input type="button" value="×" onclick="calCulate('×');" id="cng" />
<input type="button" class="gj" value="sinh" id="sinhb" onclick="calCulate(this.value);" />
<input type="button" class="gj" value="cosh" id="coshb" onclick="calCulate(this.value);" />
<input type="button" class="gj" value="tanh" id="tanhb" onclick="calCulate(this.value);" />
<input type="button" class="gj" value="Exp" onclick="calCulate(this.value);" />
<input type="button" class="pr" value="Lsh" onclick="calCulate(this.value);" />
<input type="button" class="pr" value="Rsh" onclick="calCulate(this.value);" />
<input type="button" class="tj" value="∑x" onclick="calCulate(this.value);" />
<button type="button" class="tj" onclick="calCulate(this.innerText);">∑x<sup>2</sup></button>
<br />
<input type="button" value="1" id="s1" onclick="calCulate('1');" />
<input type="button" value="2" id="s2" onclick="calCulate('2');" />
<input type="button" value="3" id="s3" onclick="calCulate('3');" />
<input type="button" value="-" onclick="calCulate('-');" />
<input type="button" class="gj" value="Int" id="intb" onclick="calCulate(this.value);" />
<input type="button" class="gj" value="dms" id="dmsb" onclick="calCulate(this.value);" />
<input type="button" class="gj" value="pi" id="pib" onclick="calCulate(this.value);" />
<input type="button" class="gj" value="F-E" onclick="calCulate(this.value);" />
<input type="button" class="pr" value="Not" onclick="calCulate(this.value);" />
<input type="button" class="pr" value="And" onclick="calCulate(this.value);" />
<button type="button" class="tj" onclick="calCulate(this.innerText);">σ<sub>n</sub></button>
<input type="button" class="tj" value="σn-1" onclick="calCulate(this.value);" />
<br />
<input type="button" value="0" id="s0" onclick="calCulate('0');" />
<input type="button" id="dot" value="." onclick="calCulate(this.value);" />
<input type="button" id="equ" value="=" onclick="calCulate(this.value);" />
<input type="button" value="+" onclick="calCulate('+');" />
<input type="button" class="gj" value="(" onclick="calCulate(this.value);" />
<input type="button" class="gj" value=")" onclick="calCulate(this.value);" />
<input type="button" class="gj" value="!" onclick="calCulate(this.value);" />
<input type="button" class="gj" value="^" onclick="calCulate(this.value);" />
<input type="button" class="pr" value="(" onclick="calCulate(this.value);" />
<input type="button" class="pr" value=")" onclick="calCulate(this.value);" />
<div id="fri">
<p id="hip" onclick="set(this);" class="set"><strong>历史记录</strong></p>
<p id="jbt" onclick="set(this);"><strong>记忆</strong></p>
<p id="hsp">尚无历史记录</p>
<p id="jyi">存储器中未保存数据</p>
</div>
<div id="about">
<span onclick="this.parentNode.style.display = 'none';">关闭</span>
<h2>关于</h2>
计算器 v3.4.0<br />
Copyright 2021 YBLUI.github.io.<br />
若要了解如何参与 Yblui-b,请在 <a href="https://github.com/yblui/yblui-b">GitHub</a> 上查看该项目。
</div>
<script src="script.js"></script>
</body>
</html>