easyui datagrid 格式化列显示两位小数、千分位

 { field: "contractmoney", title: "合同总价",  72, formatter: function (value, row, index) {
                        if (row != null) {
                            return parseFloat(value).toFixed(2);
                        }
                    }
                    },
 //二位小数、千分位

 { field: "price", title: "单价",  60, align: 'right', formatter: function (value, row, index) {
                                if (row != null) {
                                    return (parseFloat(value).toFixed(2) + '').replace(/d{1,3}(?=(d{3})+(.d*)?$)/g, '$&,');
                              }
                              }
                            },
原文地址:https://www.cnblogs.com/yimeishui/p/6229727.html