here is the demo
so let me declare one by one
$(document).on('change keyup blur','.all,.rusak',function(){ calculateAmountDue(); }); //due amount calculation function calculateAmountDue(){ var all = $('.all').val(); var rusak = $('.rusak').val(); var tersedia = all-rusak; $(".tersedia").val(tersedia); }
$(document).on('change keyup blur','.all,.rusak',function(){ calculateAmountDue(); });
This mean when input type has change or while typing text jquery do some command or execute some function, and the funtion do operation math, hope you understand what i mean ! Thanks for visiting me Salam Lappet
No comments:
Post a Comment