开发者

Formatting a Number in JQuery

I have following method in Javascript for formatting a number and get output as - $250.00

formatNumber(Math.round((finalTotal开发者_运维问答 - parseFloat(SellerAmtNoFormat)) * 100) / 100, "$###,###,###,##0.00");   

Can anyone please suggest the equivalent in jQuery?


JQuery consists entirely of javascript. So you example line above will work exactly the same in jQuery.

If there was a problem with the above code, what was the exact problem?


formatNumber(Math.round((finalTotal - parseFloat(SellerAmtNoFormat)) * 100) / 100, "$###,###,###,##0.00");   

There!


Take a look at the jQuery NumberFormatter plugin.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜