[英]currency number format styles in webpage
我想顯示我的票價詳情如下。
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>
所有這些值都會動態出現。 任何人都可以讓我如何設置這些值的樣式。 提前致謝。
我們可以使用accounting.js 庫。
<script src="path/to/accounting.js"></script>
<script type="text/javascript">
// Library ready to use:
accounting.formatMoney(5318008);
</script>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.