User Profile

Collapse

Profile Sidebar

Collapse
StoneCold
StoneCold
Last Activity: Feb 22 '13, 05:35 PM
Joined: Jan 4 '13
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • StoneCold
    replied to Make a JavaScript Calculator
    @all Guys I don't need to use eval function. Teacher said don't use it.
    here is my = function
    Code:
    function equals() {
    CurentDisplayValue = eval(document.frmOne.txtDisplay.value)
    PreviousDisplayValue = eval(total)
    
    if(TheOperator =="+") {
    	answer = PreviousDisplayValue + CurentDisplayValue
    }
    else if(TheOperator == "*") {
    	answer = PreviousDisplayValue * CurentDisplayValue
    ...
    See more | Go to post
    Last edited by Dormilich; Jan 8 '13, 06:38 AM. Reason: Please use [CODE] [/CODE] tags when posting code.

    Leave a comment:


  • StoneCold
    started a topic Make a JavaScript Calculator

    Make a JavaScript Calculator

    Hey guys, I need to make a calculator
    I have buttons for 0-9, digits = button, . button and have +, -, *, /, modules and square root operators and CE, M+, M- and backspace.
    I have made the interface. Now all I want is make the javascript code.
    It will be simple, I need a function for each and every operator. and also a switch case. can you guys plz help me??? thank you all..........
    1 Minute Ago #1
    See more | Go to post
No activity results to display
Show More
Working...