我想显示我的票价详情如下。
Faredetails
-------------------
Price : 1000
VAT : 20(+)
GST : 15(+)
Discount : 100(-)
---------------
Total : 1065
html代码:
<div class="div-active faredet">
<h3 style="text-align:center;border-bottom: 1px solid #ccc;">Fare Details</h3>
<table>
<tr>
<td>Fare </td>
<td>₹1,000.00</td>
</tr>
<tr>
<td>Discuount </td>
<td>₹10.00<span style="color:red;"> (-)</span></td>
</tr>
<tr style="border-bottom: 1px solid #ccc;"></tr>
<tr>
<td>Net Payable </td>
<td>₹900.00</td>
</tr>
</table>
</div>
所有这些值都将动态出现。所以任何人都可以让我如何设计这些价值观。提前谢谢。
答案 0 :(得分:0)
我们可以使用accounting.js库。
<script src="path/to/accounting.js"></script>
<script type="text/javascript">
// Library ready to use:
accounting.formatMoney(5318008);
</script>