|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
adding currecy using javascript...
hi guys/gals,
is there a way to add currency using javascript? java does not recognize (ex) 1,923.23 as a number even if i use parseFloat. is there a function or a method that will allow it to be recognized as a number so i can add them with different numbers with the same format? thanks in advance! peace out..... |
|
#2
|
||||
|
||||
|
indeed, "1,923" is not numeric. you can simply remove the comma:
var sum=parseFloat(price1.replace(",", ""))+parseFloat(price2.replace(",", "")); |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > adding currecy using javascript... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|