![](/img/trans.png)
[英]Large number values shows in exponential format Kendo jquery Tree List
[英]my jquery datatable shows only round values in amount column , i want to have a values with currency format like $233.25 but it shows $234
我的jQuery数据表仅在value列中显示取整值,我想使用货币格式的值,例如$233.25
但显示的是$234
。
HTML表头部分:
<thead>
<tr>
<th>Date</th>
<th>SalesNumber</th>
<th>AmountExclGST</th>
<th>GST</th>
<th>TotalAmount</th>
<th>ContactPerson</th>
<th>Status</th>
<th>FullyPaid</th>
<th>Attachment</th>
</tr>
</thead>
我的JavaScript专栏:
{
'data': 'AmountExclGST',
'render': $.fn.dataTable.render.number(',', '.', 2, 'S$')
},
我的结果栏:
amount
S$234.00
正确的格式应该是
**Amount
S$233.77**
请告知我该怎么办才能获得带有十进制值的货币格式?
用这个
{
'data': 'AmountExclGST',
'render': function ( data, type, row ) {
return parseFloat(data).toFixed(2);
}
},
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.