I need a js function that show the original count of decimals in a number. For example:
value display
2.31 2
1.0 1
2.3500 4
The problem is that i dont know how get the count of decimals.
I have that code:
value=2.3500;
return CountofDecimals(value); // must be display 4:
Anything help??? Thanks





Rating:
The post Javascript – Format number to always show the original decimal places appeared first on Javascript ASK.
via Javascript ASK http://javascriptask.phpfogapp.com/javascript-format-number-to-always-show-the-original-decimal-places.html
No comments:
Post a Comment