簡體   English   中英

網頁中的貨幣數字格式樣式

[英]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&nbsp;&nbsp;</td>
                        <td>&#x20B9;1,000.00</td>
                    </tr>
                    <tr>
                        <td>Discuount&nbsp;&nbsp;</td>
                        <td>&#8377;10.00<span style="color:red;">&nbsp;(-)</span></td>
                    </tr>
                    <tr style="border-bottom: 1px solid #ccc;"></tr>
                    <tr>
                        <td>Net Payable&nbsp;&nbsp;</td>
                        <td>&#8377;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>

參考: http : //openexchangerates.github.io/accounting.js

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM