sum of all textbox value using keyup and change event in jquery

sum of all textbox value using keyup and change event in jquery
   function fullsum() {
           var one = $("#f1").val();
           var two = $("#f2").val();
           var three = $("#f3").val();
           var totfullsum = parseFloat(one) + parseFloat(two) + parseFloat(three);
           $("#txtsum").val(parseFloat(totfullsum).toFixed(2));                 
   }

   $("input[type=text").keyup(function () {
            fullsum();
   });

or:

$("input[type=text").change(function () {
           fullsum();
  });

Post a Comment

0 Comments