这是我拥有的字符串:
"test123.00" "yes50.00"
我想将123.00和50.00相加。
我该如何做?
我使用了parseInt()命令,但在弹出框中显示NaN错误。
这是代码:
str1 = "test123.00"; str2 = "yes50.00"; total = parseInt(str1)+parseInt(str2); alert(total);
用户名或电子邮箱地址
密码