谁能帮我改一下啊!!!!!! <SCRIPT language=JavaScript> var FKeyPad = document.Keypad; var Accum = 0; var FlagNewNum = false; var PendingOp = ""; function NumPressed (Num) { if (FlagNewNum) { FKeyPad.ReadOut.value = Num; FlagNewNum = false; } else { if (FKeyPad.ReadOut.value == "0") FKeyPad.ReadOut.value = Num; else FKeyPad.ReadOut.value += Num; } } function Operation (Op) { var Readout = FKeyPad.ReadOut.value; if (FlagNewNum && PendingOp != "="); else { FlagNewNum = true; if ( '+' == PendingOp ) Accum += parseFloat(Readout); else if ( '-' == PendingOp ) Accum -= parseFloat(Readout); else if ( '/' == PendingOp ) Accum /= parseFloat(Readout); else if ( '*' == PendingOp ) Accum *= parseFloat(Readout); else Accum = parseFloat(Readout); FKeyPad.ReadOut.value = Accum; PendingOp = Op; } } function ClearEntry () { FKeyPad.ReadOut.value = "0"; FlagNewNum = true; } function Clear () { Accum = 0; PendingOp = ""; ClearEntry(); } function Neg () { FKeyPad.ReadOut.value = parseFloat(FKeyPad.ReadOut.value) * -1; } } </SCRIPT>
<form name="keypad" method="post" action=""> <table width="33%" height="219" border="1"> <tr> <td height="40" colspan="5"> <div align="right"> <input name="ReadOut" type="text" id="ReadOut"> </div></td> </tr> <tr> <td width="17%" height="42"> <div align="center"> <input name="btnSeven" type="button" id="btnSeven" value=" 7 " onclick="NumPressed('7')"> </div></td> <td width="21%"> <div align="center"> <input name="btnEight" type="button" id="btnEight" value=" 8 " onclick="NumPressed('8')"> </div></td> <td width="20%"><div align="center"> <input name="btnNine" type="button" id="a9" value=" 9 " onclick="NumPressed('9')"> </div></td> <td width="20%"><div align="center"> <input name="btnDivide" type="button" id="btnDivide" value=" / " onclick="Operation('/')"> </div></td> <td width="22%"><div align="center"> <input type="button" name="Submit5" value="sqrt"> </div></td> </tr> <tr> <td height="43"> <div align="center"> <input name="btnFour" type="button" id="btnFour" value=" 4 " onclick="NumPressed('4')"> </div></td> <td><div align="center"> <input name="btnFive" type="button" id="btnFive" value=" 5 " onclick="NumPressed('5')"> </div></td> <td><div align="center"> <input name="btnSix" type="button" id="btnSix" value=" 6 " onclick="NumPressed('6')"> </div></td> <td><div align="center"> <input name="btnMultiply" type="button" id="btnMultiply" value=" * " onclick="Operation('*')"> </div></td> <td><div align="center"> <input type="button" name="Submit10" value=" % "> </div></td> </tr> <tr> <td height="39"> <div align="center"> <input name="btnOne" type="button" id="btnOne" value=" 1 " onclick="NumPressed('1')"> </div></td> <td><div align="center"> <input name="btnTwo" type="button" id="btnTwo" value=" 2 " onclick="NumPressed('2')"> </div></td> <td><div align="center"> <input name="btnThree" type="button" id="btnThree" value=" 3 " onclick="NumPressed('3')"> </div></td> <td><div align="center"> <input name="btnMinus" type="button" id="btnMinus" value=" - " onclick="Operation('-')"> </div></td> <td><div align="center"> <input type="button" name="Submit15" value="1/x"> </div></td> </tr> <tr> <td height="41"> <input name="btnZero" type="button" id="btnZero" value=" 0 " onclick="NumPressed('0')"></td> <td><div align="center"> <input type="button" name="Submit17" value="+/-"> </div></td> <td><div align="center"> <input type="button" name="Submit18" value=" . "> </div></td> <td><div align="center"> <input name="btnPlus" type="button" id="btnPlus" value=" + " onclick="Operation('+')"> </div></td> <td><div align="center"> <input name="btnEquals" type="button" id="btnEquals" value=" = " onclick="Operation('=')"> </div></td> </tr> </table> </form>