'数字千位逗号格式化 Function Format_Number(Num) IF Num<>"" And Num>0 Then Format_Number=FormatNumber(Num,0)'这里面的 0 代表小数位数 Else Format_Number=0 End IF End Function'钱币千位逗号格式化 Function Format_Price(Num,N) IF Num<>"" And Num>0 Then Format_Price=FormatNumber(Num,N,-1) Else Format_Price=0 End IF End Function上面是我再用的两个函数,可以改写合并到一起
Function Format_Number(Num)
IF Num<>"" And Num>0 Then
Format_Number=FormatNumber(Num,0)'这里面的 0 代表小数位数
Else
Format_Number=0
End IF
End Function'钱币千位逗号格式化
Function Format_Price(Num,N)
IF Num<>"" And Num>0 Then
Format_Price=FormatNumber(Num,N,-1)
Else
Format_Price=0
End IF
End Function上面是我再用的两个函数,可以改写合并到一起
alert(a.toFixed(2));
alert(a.toFixed(2));
alert(a.toFixed(2));
正解