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

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

 { field: "price", title: "单价", width: , align: 'right', formatter: function (value, row, index) {
if (row != null) {
return (parseFloat(value).toFixed() + '').replace(/\d{,}(?=(\d{})+(\.\d*)?$)/g, '$&,');
}
}
},
上一篇:js跨域访问,No 'Access-Control-Allow-Origin' header is present on the requested resource


下一篇:三种方法实现js跨域访问