Home > Web Front-end > JS Tutorial > js amount number formatting implementation code (adding and subtracting commas)_javascript skills

js amount number formatting implementation code (adding and subtracting commas)_javascript skills

WBOY
Release: 2016-05-16 16:53:49
Original
1283 people have browsed it

例1,使数字1111111变成11,111,111.00,保留两位小数。

复制代码 代码如下:











在线运行:


[Ctrl A 全选 注:如需引入外部Js需刷新才能执行
]


例2,使数字1111111变成11,111,111---和使11,111,111变成1111111---整数--

 

代码如下:





js 格式化金额的代码---www.jb51.net










运行测试:
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template