我有这个代码,我想要数字中的逗号。
累积奖金为€169.85,但在游戏中显示为16985 00
。如何解决?
public function jackpotstring():String {
var myPattern:RegExp = /./;
var jp:Number = jackpot * denom;
var s:String = jp.toFixed(2)+"";
return s.replace(/[^A-Za-z0-9 \-_:]+/g, ' ');
}
答案 0 :(得分:0)
var jp:Number = jackpot * denom;
jp = Math.round(jp * 100)/100; // value should be something like 1698500
jp = jp / 10000; // value should be something like 169.85 now
var s:String = String(jp);
return s;