开发者

convert simple c# method to jquery

double myNumber;

myNumber.ToString("0.:#0").Replace(".", "");

Could someone tel开发者_高级运维l me the equivalent jquery function?

Sorry not to good with jquery.

Thanks,


jQuery is not necessary for this and actually doesn't have number formatting methods (unless you use a plugin).

I would do it like this just using native JavaScript:

var myNumber;

myNumber.toFixed(2).replace(".", ":");

The toFixed() method allows you to specify the number digits after the decimal place.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜