قرار دادن ماشین حساب در سایت
<!--Powered java code by WwW.IranGamer.Com--> <br><!-- Start of CoffeeCup Calculator --> <br><!-- A Simple Calculator --> <br><!-- Instructions: Just put this anywhere on your webpage <br> between the body tags and you will have a calculator for your visitors! --> <br><!-- supplied with CoffeeCup HTML Editor --> <br><!-- www.iransohrab.net --> <br><CENTER> <br> <br><FORM name="Keypad" action=""> <br><TABLE> <br><B> <br><TABLE border=2 width=50 height=60 cellpadding=1 cellspacing=5> <br><TR> <br><TD colspan=3 align=middle> <br><input name="ReadOut" type="Text" size=24 value="0" width=100% style="float: left"> <br></TD> <br><TD <br></TD> <br><TD> <br><p align="center"> <br><input name="btnClear" type="Button" value=" C " onclick="Clear()"> <br></TD> <br><TD><input name="btnClearEntry" type="Button" value=" CE " onclick="ClearEntry()"> <br></TD> <br></TR> <br><TR> <br><TD> <br><p align="center"> <br><input name="btnSeven" type="Button" value=" 7 " onclick="NumPressed(7)"> <br></TD> <br><TD> <br><p align="center"> <br><input name="btnEight" type="Button" value=" 8 " onclick="NumPressed(8)"> <br></TD> <br><TD> <br><p align="center"> <br><input name="btnNine" type="Button" value=" 9 " onclick="NumPressed(9)"> <br></TD> <br><TD> <br></TD> <br><TD> <br><input name="btnNeg" type="Button" value=" +/- " onclick="Neg()"> <br></TD> <br><TD> <br><p align="center"> <br><input name="btnPercent" type="Button" value=" % " onclick="Percent()"> <br></TD> <br></TR> <br><TR> <br><TD> <br><p align="center"> <br><input name="btnFour" type="Button" value=" 4 " onclick="NumPressed(4)"> <br></TD> <br><TD> <br><p align="center"> <br><input name="btnFive" type="Button" value=" 5 " onclick="NumPressed(5)"> <br></TD> <br><TD> <br><p align="center"> <br><input name="btnSix" type="Button" value=" 6 " onclick="NumPressed(6)"> <br></TD> <br><TD> <br></TD> <br><TD align=middle><input name="btnPlus" type="Button" value=" + " onclick="Operation("+")"> <br></TD> <br><TD align=middle><input name="btnMinus" type="Button" value=" - " onclick="Operation("-")"> <br></TD> <br></TR> <br><TR> <br><TD> <br><p align="center"> <br><input name="btnOne" type="Button" value=" 1 " onclick="NumPressed(1)"> <br></TD> <br><TD> <br><p align="center"> <br><input name="btnTwo" type="Button" value=" 2 " onclick="NumPressed(2)"> <br></TD> <br><TD> <br><p align="center"> <br><input name="btnThree" type="Button" value=" 3 " onclick="NumPressed(3)"> <br></TD> <br><TD> <br></TD> <br><TD align=middle><input name="btnMultiply" type="Button" value=" * " onclick="Operation("*")"> <br></TD> <br><TD align=middle><input name="btnDivide" type="Button" value=" / " onclick="Operation("/")"> <br></TD> <br></TR> <br><TR> <br><TD> <br><p align="center"> <br><input name="btnZero" type="Button" value=" 0 " onclick="NumPressed(0)"> <br></TD> <br><TD> <br><p align="center"> <br><input name="btnDecimal" type="Button" value=" . " onclick="Decimal()"> <br></TD> <br><TD colspan=3> <br></TD> <br><TD> <br><p align="center"> <br><input name="btnEquals" type="Button" value=" = " onclick="Operation("=")"> <br></TD> <br></TR> <br></TABLE> <br></TABLE> <br></B> <br></FORM> <br></CENTER> <br><font face="Verdana, Arial, Helvetica" size=2> <br>< LANGUAGE="Java"> <br><!-- Begin <br>var FKeyPad = document.Keypad; <br>var Accumulate = 0; <br>var FlagNewNum = false; <br>var PendingOp = ""; <br>function NumPressed (Num) { <br>if (FlagNewNum) { <br>FKeyPad.ReadOut.value = Num; <br>FlagNewNum = false; <br> } <br>else { <br>if (FKeyPad.ReadOut.value == "0") <br>FKeyPad.ReadOut.value = Num; <br>else <br>FKeyPad.ReadOut.value += Num; <br> } <br>} <br>function Operation (Op) { <br>var Readout = FKeyPad.ReadOut.value; <br>if (FlagNewNum && PendingOp != "="); <br>else <br>{ <br>FlagNewNum = true; <br>if ( "+" == PendingOp ) <br>Accumulate += parseFloat(Readout); <br>else if ( "-" == PendingOp ) <br>Accumulate -= parseFloat(Readout); <br>else if ( "/" == PendingOp ) <br>Accumulate /= parseFloat(Readout); <br>else if ( "*" == PendingOp ) <br>Accumulate *= parseFloat(Readout); <br>else <br>Accumulate = parseFloat(Readout); <br>FKeyPad.ReadOut.value = Accumulate; <br>PendingOp = Op; <br> } <br>} <br>function Decimal () { <br>var curReadOut = FKeyPad.ReadOut.value; <br>if (FlagNewNum) { <br>curReadOut = "0."; <br>FlagNewNum = false; <br> } <br>else <br>{ <br>if (curReadOut.indexOf(".") == -1) <br>curReadOut += "."; <br> } <br>FKeyPad.ReadOut.value = curReadOut; <br>} <br>function ClearEntry () { <br>FKeyPad.ReadOut.value = "0"; <br>FlagNewNum = true; <br>} <br>function Clear () { <br>Accumulate = 0; <br>PendingOp = ""; <br>ClearEntry(); <br>} <br>function Neg () { <br>FKeyPad.ReadOut.value = parseFloat(FKeyPad.ReadOut.value) * -1; <br>} <br>function Percent () { <br>FKeyPad.ReadOut.value = (parseFloat(FKeyPad.ReadOut.value) / 100) * parseFloat(Accumulate); <br>} <br>// End --> <br></></font> <br><p align="center"><a target="_blank" href="http://WwW.IranGamer.Com"> <br><font size="2">Tarfandestan</font></a></p>