Answers for "jquery convert number to decimal"

4

javascript convert string to 2 decimal

var twoPlacedFloat = parseFloat(yourString).toFixed(2)
Posted by: Guest on July-31-2020
0

jquery convert number to decimal

$(document).ready(function() {
  $('.add').click(function() {
     var value = parseFloat($('#total').text()) + parseFloat($(this).data('amount'))/100
     $('#total').text( value.toFixed(2) );
  });
})
Posted by: Guest on February-04-2021

Code answers related to "jquery convert number to decimal"

Code answers related to "Javascript"

Browse Popular Code Answers by Language