How to code html page to calculate: (text input #) X (text input2 #) X ( #)= total

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dee5560
    New Member
    • Sep 2012
    • 1

    How to code html page to calculate: (text input #) X (text input2 #) X ( #)= total

    How do you code html page to calculate on the fly (input#) X (input#) X (constant#) = Total $ ?
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    You use javascript and events. That's pretty much all I can say at this point with the level of detail you have given.

    If you post what code you've tried, we can help further, but as of now, you haven't posted much to work with.

    Comment

    • Bharat383
      New Member
      • Aug 2011
      • 93

      #3
      you can use javascript to calculate this.

      like this

      Code:
      var ans = parseInt(document.getElementById("txt1").value)*parseInt(document.getElementById("txt1").value)* 5;
      
      alert(ans);
      Last edited by gits; Sep 5 '12, 03:10 PM. Reason: added code tags

      Comment

      Working...