jquery - Adding floats with javascript -


I am using jQuery, and I want to add value to my table column, everything works fine, But my value is returned to a string with all values ​​such as: 123.5013.0012.35

How can I sum it properly?

  var totals $ (".add") each (function (i) {totals + = parsefloat ($ (this) .text ()). ToFixed (2);}); Console.log (yoga);  

You have encountered many errors, not starting the totals for a numeric value, Eg 0.0 The second is not feeling that Fix () gives a string.

Actually the same question has been said before and before the answer, for that you should solve it.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -