Why does 6.00 + (plus) 5.00 = “5.006.00”?
问题 If I have a variable that is given a "numeric" value from a PHP echo ... var names_each = <?php echo $ind_name_each; ?>; ...and $ind_name_each is derived from a MySQL column of type decimal(5,2) , is it a number or a string in JavaScript? if all_total = 6.00 and names_each = 5.00 and I do this: all_total = parseInt(names_each) + all_total; I get 56.00 all_total = names_each + all_total; I get 5.006.00 all_total = parseFloat(names_each) + all_total; I get 56.00 I need some understanding here.