标签:function 精度 float price oat rip var ice alert
<script type="text/javascript">
//parseFloat
function actionoftext(){
var price = 10.99;
var quantity = 7;
var a="18.11";
var b="36.23"
//54.339999999999996
var t=0;
var needPay = parseFloat(a);
needPay = needPay+parseFloat(b);
alert("test"+needPay);
document.write("test "+needPay);
}
</script>
标签:function 精度 float price oat rip var ice alert
原文地址:http://www.cnblogs.com/rojas/p/6903308.html