Skip to content Skip to sidebar Skip to footer

JQuery Sum Using Checkbox Value And Textbox Value

How could I get the Final Total based on the sum of a checkbox value and the contents of a textbox? JSFiddle example My HTML:
10

Solution 1:

Just bind a focus event and do it -

$('#final').bind('focus',function(){
    $(this).val(parseInt($('#total1').val())+parseInt($('#total2').val())); 
                         });

LIVE http://jsfiddle.net/mailmerohit5/h43te3z6/


Post a Comment for "JQuery Sum Using Checkbox Value And Textbox Value"