Ext数字格式化

Ext.util.Format.number(v,format)

v     :要进行格式化的值
format:格式化字符串

0与#的区别:
0:在小数位数不够时会补零
#:在小数位数不够时不会补零

 Ext.util.Format.number(23456.789,'0,0.0000')
"23,456.7890"
Ext.util.Format.number(23456.789,'#,#.####')
"23,456.789" Ext.util.Format.number(23456.789,'0,00.0000')
"23,456.7890"
Ext.util.Format.number(23456.789,'#,##.####')
"23,456.789" Ext.util.Format.number(23456.789,'0,000.0000')
"23,456.7890"
Ext.util.Format.number(23456.789,'#,###.####')
"23,456.789" Ext.util.Format.number(23456.789,'0,0000.0000')
"23,456.7890"
Ext.util.Format.number(23456.789,'#,####.####')
"23,456.789" Ext.util.Format.number(23456.789123,'#,###.####')
"23,456.7891"
Ext.util.Format.number(23456.789123,'0,000.0000')
"23,456.7891"
上一篇:java 获取 path


下一篇:JAVA如何调用mysql写的存储过程