9
Javascript解析浮点数忽略逗号后的小数
这是一个简单的场景。我想显示在我的网站上显示的两个值的减法: //Value on my websites HTML is: "75,00" var fullcost = parseFloat($("#fullcost").text()); //Value on my websites HTML is: "0,03" var auctioncost = parseFloat($("#auctioncost").text()); alert(fullcost); //Outputs: 75 alert(auctioncost); //Ouputs: 0 谁能告诉我我在做什么错?