js代码见上篇!
- <body bgcolor="fcfff7" leftmargin="0" topmargin="0" marginwidth="0">
- <br>
- <DIV align=center>
- <FORM name=calc>
- <TABLE width=650 height=250 bgcolor="#E6F2E7" style="border-width:1px 1px 1px 1px;border-style:solid;border-color:#8AB78A;">
- <TBODY>
- <TR>
- <TD height=50 bgcolor="#E6F2E7">
- <TABLE width=100%>
- <TBODY>
- <TR><TD align=center><FONT color=#205001>www.hao123.com </FONT></TD></TR>
- <TR>
- <TD height="35" align=center>
- <INPUT name=display readOnly size=50 value=0 style=" font-size:18px;"></TD>
- </TR></TBODY></TABLE></TD>
- </TR>
- <TR>
- <TD bgcolor="#E6F2E7">
- <TABLE width=100% style="border-width:1px 0px 0px 0px;border-style:solid;border-color:#8AB78A;">
- <TBODY>
- <TR>
- <TD style="color:#205001;"><INPUT name=carry
- type=radio> 十六进制 <INPUT CHECKED name=carry
- onclick=inputChangCarry(10) type=radio> 十进制 <INPUT name=carry
- onclick=inputChangCarry(8) type=radio> 八进制 <INPUT name=carry
- <TD width="187" style="color:#205001;"><INPUT CHECKED name=angle
- onclick="inputChangAngle('d')" type=radio value=d>
- 角度制
- <INPUT
- name=angle onclick="inputChangAngle('r')" type=radio value=r>
- 弧度制 </TD>
- </TR></TBODY></TABLE>
- <TABLE width=100%>
- <TBODY>
- <TR>
- <TD width=170 style="color:#205001;"><INPUT name=shiftf
- type=checkbox>上档功能 <INPUT name=hypf
- type=checkbox>双曲函数 </TD>
- <TD width="154" align="center"><INPUT name=bracket readOnly size=3
- style="BACKGROUND-COLOR: lightgrey; line-height:24px;"> <INPUT name=memory readOnly
- size=3 style="BACKGROUND-COLOR: lightgrey; line-height:24px;"> <INPUT name=operator
- readOnly size=3 style="BACKGROUND-COLOR: lightgrey; "> </TD>
- <TD align="right"><INPUT onclick=backspace() style="COLOR: B50506; line-height:24px;" type=button value=" 退格 ">
- <INPUT onclick="document.calc.display.value = 0 " style="COLOR: #B50506; line-height:24px;" type=button value=" 清屏 ">
- <INPUT onclick=clearall() style="COLOR: #B50506; line-height:24px;" type=button value=" 全清 "> </TD>
- </TR></TBODY></TABLE>
- <TABLE width=100%>
- <TBODY>
- <TR>
- <TD>
- <TABLE>
- <TBODY>
- <TR align=middle>
- <TD><INPUT name=pi onclick="inputfunction('pi','pi')" style="COLOR: #1919CD; line-height:24px;" type=button value=" PI ">
- </TD>
- <TD><INPUT name=e onclick="inputfunction('e','e')" style="COLOR: #1919CD; line-height:24px;" type=button value=" E ">
- </TD>
- <TD><INPUT name=bt onclick="inputfunction('dms','deg')" style="COLOR: #D316D3; line-height:24px;" type=button value=" d.ms ">
- </TD></TR>
- <TR align=middle>
- <TD><INPUT onclick=addbracket() style="COLOR: #D316D3; line-height:24px;" type=button value=" ( ">
- </TD>
- <TD><INPUT onclick=disbracket() style="COLOR: #D316D3; line-height:24px;" type=button value=" ) ">
- </TD>
- <TD><INPUT name=ln onclick="inputfunction('ln','exp')" style="COLOR: #D316D3; line-height:24px;" type=button value=" ln ">
- </TD></TR>
- <TR align=middle>
- <TD><INPUT name=sin onclick="inputtrig('sin','arcsin','hypsin','ahypsin')" style="COLOR: #D316D3; line-height:24px;" type=button value="sin ">
- </TD>
- <TD><INPUT onclick="operation('^',7)" style="COLOR: #D316D3; line-height:24px;" type=button value="x^y ">
- </TD>
- <TD><INPUT name=log onclick="inputfunction('log','expdec')" style="COLOR: #D316D3; line-height:24px;" type=button value=" log ">
- </TD></TR>
- <TR align=middle>
- <TD><INPUT name=cos onclick="inputtrig('cos','arccos','hypcos','ahypcos')" style="COLOR: #D316D3; line-height:24px;" type=button value="cos ">
- </TD>
- <TD><INPUT name=cube onclick="inputfunction('cube','cubt')" style="COLOR: #D316D3; line-height:24px;" type=button value="x^3 ">
- </TD>
- <TD><INPUT onclick="inputfunction('!','!')" style="COLOR: #D316D3; line-height:24px;" type=button value=" n! ">
- </TD></TR>
- <TR align=middle>
- <TD><INPUT name=tan onclick="inputtrig('tan','arctan','hyptan','ahyptan')" style="COLOR: #D316D3; line-height:24px;" type=button value="tan ">
- </TD>
- <TD><INPUT name=sqr onclick="inputfunction('sqr','sqrt')" style="COLOR: #D316D3; line-height:24px;" type=button value="x^2 ">
- </TD>
- <TD><INPUT onclick="inputfunction('recip','recip')" style="COLOR: #D316D3; line-height:24px;" type=button value=" 1/x ">
- </TD></TR></TBODY></TABLE></TD>
- <TD width=30></TD>
- <TD>
- <TABLE>
- <TBODY>
- <TR>
- <TD align="center"><INPUT onclick=putmemory() style="COLOR: #B50506; line-height:24px;" type=button value=" 储存 "> </TD>
- </TR>
- <TR>
- <TD><INPUT onclick=getmemory() style="COLOR: #B50506; line-height:24px;" type=button value=" 取存 ">
- </TD></TR>
- <TR>
- <TD><INPUT onclick=addmemory() style="COLOR: #B50506; line-height:24px;" type=button value=" 累存 ">
- </TD></TR>
- <TR>
- <TD><INPUT onclick=multimemory() style="COLOR: #B50506; line-height:24px;" type=button value=" 积存 ">
- </TD></TR>
- <TR>
- <TD height=33><INPUT onclick=clearmemory() style="COLOR: #B50506; line-height:24px;" type=button value=" 清存 ">
- </TD></TR></TBODY></TABLE></TD>
- <TD width=30></TD>
- <TD>
- <TABLE>
- <TBODY>
- <TR align=middle>
- <TD><INPUT name=k7 onclick="inputkey('7')" style="COLOR: #1919CD; font-size:16px; line-height:24px; " type=button value=" 7 ">
- </TD>
- <TD><INPUT name=k8 onclick="inputkey('8')" style="COLOR: #1919CD; font-size:16px; line-height:24px;" type=button value=" 8 ">
- </TD>
- <TD><INPUT name=k9 onclick="inputkey('9')" style="COLOR: #1919CD; font-size:16px; line-height:24px;" type=button value=" 9 ">
- </TD>
- <TD><INPUT onclick="operation('/',6)" style="COLOR: #B50506; font-size:14px; line-height:24px;" type=button value=" / ">
- </TD>
- <TD><INPUT onclick="operation('%',6)" style="COLOR: #B50506; font-size:14px; line-height:24px;" type=button value=" 取余 ">
- </TD>
- <TD><INPUT onclick="operation('&',3)" style="COLOR: #B50506; font-size:14px; line-height:24px;" type=button value=" 与 ">
- </TD></TR>
- <TR align=middle>
- <TD><INPUT name=k4 onclick="inputkey('4')" style="COLOR: #1919CD; font-size:16px; line-height:24px;" type=button value=" 4 ">
- </TD>
- <TD><INPUT name=k5 onclick="inputkey('5')" style="COLOR: #1919CD; font-size:16px; line-height:24px;" type=button value=" 5 ">
- </TD>
- <TD><INPUT name=k6 onclick="inputkey('6')" style="COLOR: #1919CD; font-size:16px; line-height:24px;" type=button value=" 6 ">
- </TD>
- <TD><INPUT onclick="operation('*',6)" style="COLOR: #B50506; font-size:14px; line-height:24px;" type=button value=" * ">
- </TD>
- <TD><INPUT name=floor onclick="inputfunction('floor','deci')" style="COLOR: #B50506; font-size:14px; line-height:24px;" type=button value=" 取整 ">
- </TD>
- <TD><INPUT onclick="operation('|',1)" style="COLOR: #B50506; font-size:14px; line-height:24px;" type=button value=" 或 ">
- </TD></TR>
- <TR align=middle>
- <TD><INPUT onclick="inputkey('1')" style="COLOR: #1919CD; font-size:16px; line-height:24px;" type=button value=" 1 ">
- </TD>
- <TD><INPUT name=k2 onclick="inputkey('2')" style="COLOR: #1919CD; font-size:16px; line-height:24px;" type=button value=" 2 ">
- </TD>
- <TD><INPUT name=k3 onclick="inputkey('3')" style="COLOR: #1919CD; font-size:16px; line-height:24px;" type=button value=" 3 ">
- </TD>
- <TD><INPUT onclick="operation('-',5)" style="COLOR: #B50506; font-size:14px; line-height:24px;" type=button value=" - ">
- </TD>
- <TD><INPUT onclick="operation('<',4)" style="COLOR: #B50506; font-size:14px; line-height:24px;" type=button value=" 左移 ">
- </TD>
- <TD><INPUT onclick="inputfunction('~','~')" style="COLOR: #B50506; font-size:14px; line-height:24px;" type=button value=" 非 ">
- </TD></TR>
- <TR align=middle>
- <TD><INPUT onclick="inputkey('0')" style="COLOR: #1919CD; font-size:16px; line-height:24px;" type=button value=" 0 ">
- </TD>
- <TD><INPUT onclick=changeSign() style="COLOR: #1919CD; font-size:16px; line-height:24px;" type=button value=" +/- ">
- </TD>
- <TD><INPUT name=kp onclick="inputkey('.')" style="COLOR: #1919CD; font-size:16px; line-height:24px;" type=button value=" . ">
- </TD>
- <TD><INPUT onclick="operation('+',5)" style="COLOR: #B50506; font-size:14px; line-height:24px;" type=button value=" + ">
- </TD>
- <TD><INPUT onclick=result() style="COLOR: #B50506; font-size:14px; line-height:24px;" type=button value=" = ">
- </TD>
- <TD><INPUT onclick="operation('x',2)" style="COLOR: #B50506; font-size:14px; line-height:24px;" type=button value=" 异或 ">
- </TD></TR>
- <TR align=middle>
- <TD><INPUT disabled name=ka onclick="inputkey('a')" style="COLOR: #1919CD; font-size:14px; line-height:24px;" type=button value=" A ">
- </TD>
- <TD><INPUT disabled name=kb onclick="inputkey('b')" style="COLOR: #1919CD; font-size:14px; line-height:24px;" type=button value=" B ">
- </TD>
- <TD><INPUT disabled name=kc onclick="inputkey('c')" style="COLOR: #1919CD; font-size:14px; line-height:24px;" type=button value=" C ">
- </TD>
- <TD><INPUT disabled name=kd onclick="inputkey('d')" style="COLOR: #1919CD; font-size:14px; line-height:24px;" type=button value=" D ">
- </TD>
- <TD align="center"><INPUT disabled name=ke onclick="inputkey('e')" style="COLOR: #1919CD; font-size:14px; line-height:24px;" type=button value=" E "> </TD>
- <TD align="center"><INPUT disabled name=kf onclick="inputkey('f')" style="COLOR: #1919CD; font-size:14px; line-height:24px;" type=button value=" F "> </TD>
- </TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></FORM></DIV>
- </body>
- </html>