演
示
源
代
码
计 算 器
注释:放在<body>与</body>之间
<table border=6 cellspacing=2 cellpadding=3> <tr> <td valign=middle align=center colspan=9 bgcolor="yellow"> <font size=4 color="#800040"><b>超 级 计 算 器</b></font><font size=6 color="#800040"><b></b></font></td> </tr> <tr> <td valign=middle align=center colspan=6> <input type="text" name="list" size=22 value="Start Punching!"> </td> <td valign=middle align=center colspan=3> <input type="button" name="alex" value=" CLEAR " onClick="eraser()"> </td> </tr> <tr> <td valign=middle align=center colspan=6> <input type="text" name="display" size=22 value=""> </td> <td valign=middle align=center colspan=2> <input type="button" name="alex" value=" = " onClick="equal()"> </td> <td valign=middle align=center> <input type="button" name="alex" value=" <-- " onClick="backer()"> </td> </tr> <tr> <td valign=middle align=center> <input type="button" name="alex" value=" 1 " onClick="enter(1)"> </td> <td valign=middle align=center> <input type="button" name="alex" value=" 2 " onClick="enter(2)"> </td> <td valign=middle align=center> <input type="button" name="alex" value=" 3 " onClick="enter(3)"> </td> <td></td> <td valign=middle align=center> <input type="button" name="alex" value=" / " onClick="calculate('/')"> </td> <td></td> <td valign=middle align=center> <input type="button" name="alex" value=" sin " onClick="calc(1)"> </td> <td valign=middle align=center> <input type="button" name="alex" value=" x½ " onClick="calc(4)"> </td> <td valign=middle align=center> <input type="button" name="alex" value="<->M" onClick="mem(0)"> </td> </tr> <tr> <td valign=middle align=center> <input type="button" name="alex" value=" 4 " onClick="enter(4)"> </td> <td valign=middle align=center> <input type="button" name="alex" value=" 5 " onClick="enter(5)"> </td> <td valign=middle align=center> <input type="button" name="alex" value=" 6 " onClick="enter(6)"> </td> <td></td> <td valign=middle align=center> <input type="button" name="alex" value=" * " onClick="calculate('*')"> </td> <td></td> <td valign=middle align=center> <input type="button" name="alex" value="cos" onClick="calc(2)"> </td> <td valign=middle align=center> <input type="button" name="alex" value=" x² " onClick="calc(7)"> </td> <td valign=middle align=center> <input type="button" name="alex" value="--> M" onClick="mem(1)"> </td> </tr> <tr> <td valign=middle align=center> <input type="button" name="alex" value=" 7 " onClick="enter(7)"> </td> <td valign=middle align=center> <input type="button" name="alex" value=" 8 " onClick="enter(8)"> </td> <td valign=middle align=center> <input type="button" name="alex" value=" 9 " onClick="enter(9)"> </td> <td></td> <td valign=middle align=center> <input type="button" name="alex" value=" - " onClick="calculate('-')"> </td> <td></td> <td valign=middle align=center> <input type="button" name="alex" value="tan " onClick="calc(3)"> </td> <td valign=middle align=center> <input type="button" name="alex" value="1/x " onClick="calc(6)"> </td> <td valign=middle align=center> <input type="button" name="alex" value="<-- M" onClick="mem(-1)"> </td> </tr> <tr> <td valign=middle align=center> <input type="button" name="alex" value=" 0 " onClick="enter(0)"> </td> <td valign=middle align=center> <input type="button" name="alex" value="dot" onClick="enter('.')"> </td> <td valign=middle align=center> <input type="button" name="alex" value=" +|- " onClick="change()"> </td> <td></td> <td valign=middle align=center> <input type="button" name="alex" value=" + " onClick="calculate('+')"> </td> <td></td> <td valign=middle align=center> <input type="button" name="alex" value=" pi " onClick="pie()"> </td> <td valign=middle align=center> <input type="button" name="alex" value=" Ln " onClick="calc(5)"> </td> <td valign=middle align=center> <input type="button" name="alex" value=" x^y " onClick="calculate('p')"> </td> </tr> <tr> <tr> <td valign=middle align=center colspan=9></td> </tr> <tr> <td valign=middle align=center colspan=9> <input type="text" name="c1" size=4 value=""> *X² + <input type="text" name="c2" size=4 value=""> *X + <input type="text" name="c3" size=4 value=""> = 0 <input type="button" name="alex" value="Solve" onClick="fsolve()"> </td> </tr> </table>
当前位置:
首 页
→JavaScript
→实用JST
→计算器
··万旭网站工作室 设计发布··