Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

add two numbers in jquery

$(document).ready(function(){
    $("input").focus(function(){
      var fee = parseInt($("#fee").val());
      var installments = parseInt($("#installments").val());

      $("#installment_fee").val(fee/installments);
    });
    $("input").blur(function(){
      var fee = parseInt($("#fee").val());
      var installments = parseInt($("#installments").val());

      $("#installment_fee").val(fee/installments);
    });
});
 
PREVIOUS NEXT
Tagged: #add #numbers #jquery
ADD COMMENT
Topic
Name
1+8 =