FREE CODE Monday, 12.18.2017, 4:27 AM
Main | Registration | Login Welcome Guest | RSS
[ New messages · Members · Forum rules · Search · RSS ]
۞Forum Statistics۞
NEW TOPPIV
HOT TOPPIC
TOP MEMBERS
NEW MEMBERS
  • check code here Have(0) reviews faxuhi
  • Keywords meta Tags Have(0) reviews faxuhi
  • text box Have(0) reviews faxuhi
  • Page description Have(0) reviews faxuhi
  • marquee Have(0) reviews faxuhi
  • print your page Have(0) reviews faxuhi
  • choose your country Have(0) reviews faxuhi
  • check all - unchek all Have(0) reviews faxuhi
  • shadow text Have(0) reviews faxuhi
  • Beautiful text two Have(0) reviews faxuhi
  • Nice menu with java script <p1> Have(2) reviews faxuhi
  • Mouse Clock Have(1) reviews faxuhi
  • HTML table placeholder Have(0) reviews faxuhi
  • Html graphic bullets Have(0) reviews faxuhi
  • Different times of the world by the users choice from a list Have(0) reviews faxuhi
  • Mouseover Alert HTML Script Have(0) reviews faxuhi
  • Redirect to another page and link automatically to other pg Have(0) reviews faxuhi
  • Combo box link box to browse your website easily Have(0) reviews faxuhi
  • Message to user by clicking a button Have(0) reviews faxuhi
  • Background changing color effect Have(0) reviews faxuhi
  • faxuhi[189]Bài
  • mcsnagger0022[0]Bài
  • thinknoodles[0]Bài
  • karaganis888[0]Bài
  • faxuhi [189]Bài
  • mcsnagger0022 [0]Bài
  • thinknoodles [0]Bài
  • karaganis888 [0]Bài
  • Page 1 of 11
    Forum » HTML Codes » Calculator in your page » Calculator in your page
    Calculator in your page
    faxuhiDate: Monday, 07.25.2011, 4:41 PM | Message # 1
    Colonel
    Group: Administrators
    Messages: 189
    Reputation: 0
    Status: Offline
    Code
    <CENTER>

    <FORM name="Keypad" action="">
    <TABLE>
    <B>
    <TABLE border=2 width=50 height=60 cellpadding=1 cellspacing=5>
    <TR>
    <TD colspan=3 align=middle>
    <input name="ReadOut" type="Text" size=24 value="0" width=100%>
    </TD>
    <TD
    </TD>
    <TD>
    <input name="btnClear" type="Button" value="  C  " onclick="Clear()">
    </TD>
    <TD><input name="btnClearEntry" type="Button" value="  CE " onclick="ClearEntry()">
    </TD>
    </TR>
    <TR>
    <TD>
    <input name="btnSeven" type="Button" value="  7  " onclick="NumPressed(7)">
    </TD>
    <TD>
    <input name="btnEight" type="Button" value="  8  " onclick="NumPressed(8)">
    </TD>
    <TD>
    <input name="btnNine" type="Button" value="  9  " onclick="NumPressed(9)">
    </TD>
    <TD>
    </TD>
    <TD>
    <input name="btnNeg" type="Button" value=" +/- " onclick="Neg()">
    </TD>
    <TD>
    <input name="btnPercent" type="Button" value="  % " onclick="Percent()">
    </TD>
    </TR>
    <TR>
    <TD>
    <input name="btnFour" type="Button" value="  4  " onclick="NumPressed(4)">
    </TD>
    <TD>
    <input name="btnFive" type="Button" value="  5  " onclick="NumPressed(5)">
    </TD>
    <TD>
    <input name="btnSix" type="Button" value="  6  " onclick="NumPressed(6)">
    </TD>
    <TD>
    </TD>
    <TD align=middle><input name="btnPlus" type="Button" value="  +  " onclick="Operation('+')">
    </TD>
    <TD align=middle><input name="btnMinus" type="Button" value="   -   " onclick="Operation('-')">
    </TD>
    </TR>
    <TR>
    <TD>
    <input name="btnOne" type="Button" value="  1  " onclick="NumPressed(1)">
    </TD>
    <TD>
    <input name="btnTwo" type="Button" value="  2  " onclick="NumPressed(2)">
    </TD>
    <TD>
    <input name="btnThree" type="Button" value="  3  " onclick="NumPressed(3)">
    </TD>
    <TD>
    </TD>
    <TD align=middle><input name="btnMultiply" type="Button" value="  *  " onclick="Operation('*')">
    </TD>
    <TD align=middle><input name="btnDivide" type="Button" value="   /   " onclick="Operation('/')">
    </TD>
    </TR>
    <TR>
    <TD>
    <input name="btnZero" type="Button" value="  0  " onclick="NumPressed(0)">
    </TD>
    <TD>
    <input name="btnDecimal" type="Button" value="   .  " onclick="Decimal()">
    </TD>
    <TD colspan=3>
    </TD>
    <TD>
    <input name="btnEquals" type="Button" value="  =  " onclick="Operation('=')">
    </TD>
    </TR>
    </TABLE>
    </TABLE>
    </B>
    </FORM>
    </CENTER>
    <font face="Verdana, Arial, Helvetica" size=2>
    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
    var FKeyPad = document.Keypad;
    var Accumulate = 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 )
    Accumulate += parseFloat(Readout);
    else if ( '-' == PendingOp )
    Accumulate -= parseFloat(Readout);
    else if ( '/' == PendingOp )
    Accumulate /= parseFloat(Readout);
    else if ( '*' == PendingOp )
    Accumulate *= parseFloat(Readout);
    else
    Accumulate = parseFloat(Readout);
    FKeyPad.ReadOut.value = Accumulate;
    PendingOp = Op;
        }
    }
    function Decimal () {
    var curReadOut = FKeyPad.ReadOut.value;
    if (FlagNewNum) {
    curReadOut = "0.";
    FlagNewNum = false;
        }
    else
    {
    if (curReadOut.indexOf(".") == -1)
    curReadOut += ".";
        }
    FKeyPad.ReadOut.value = curReadOut;
    }
    function ClearEntry () {
    FKeyPad.ReadOut.value = "0";
    FlagNewNum = true;
    }
    function Clear () {
    Accumulate = 0;
    PendingOp = "";
    ClearEntry();
    }
    function Neg () {
    FKeyPad.ReadOut.value = parseFloat(FKeyPad.ReadOut.value) * -1;
    }
    function Percent () {
    FKeyPad.ReadOut.value = (parseFloat(FKeyPad.ReadOut.value) / 100) * parseFloat(Accumulate);
    }
    // End -->
    </SCRIPT>
     
    Forum » HTML Codes » Calculator in your page » Calculator in your page
    Page 1 of 11
    Search:

    Copyright MyCorp © 2017 Website builderuCoz