Displaying the Indian currency symbol on a website

2019-01-05 09:10发布

This symbol for the rupee, the currency of India, was approved by the Union Cabinet on 15 July 2010.

Indian currency symbol

How can I display it on a website?

15条回答
相关推荐>>
2楼-- · 2019-01-05 09:35

You can do it with Intl.NumberFormat native API.

var number = 123456.78;

// India uses thousands/lakh/crore separators
console.log(new Intl.NumberFormat('en-IN', {
  style: 'currency',
  currency: 'INR'
}).format(number));

查看更多
迷人小祖宗
3楼-- · 2019-01-05 09:36

WebRupee is a web API for the Indian currency symbol. It provides a simple, cross browser method for using the Rrupee symbol on your webpage, blog or anywhere on the web.

Here is a method for printing the Indian currency symbol:

<html>
<head>
    <link rel="stylesheet" type="text/css" href="http://cdn.webrupee.com/font">
    <script src=http://cdn.webrupee.com/js type=”text/javascript”></script>
</head>
<body>
    Rupee Symbol: <span class="WebRupee">Rs.</span> 200

This means if somebody copies text from your site and pastes it somewhere else, he will see Rs and not some other or blank character.

You can now also use the new Rupee unicode symbol — U+20B9 INDIAN RUPEE SIGN. It can be used in this manner:

<span class="WebRupee">&#x20B9;</span> 500

Just include the following script and it will update all the "Rs" / "Rs." for you:

<script src="http://cdn.webrupee.com/js" type="text/javascript"></script>
查看更多
劳资没心,怎么记你
4楼-- · 2019-01-05 09:36

Image approach is not bad either. It hardly takes 400Bytes.
Download from here http://i.stack.imgur.com/vJZ9m.png

<span class="rupee"></span>

Well i found it better than webrupee.

For colors edit the image as below

    .rupee{
    background-position:left;
    width: 10px; 
    height: 14px;
    background-image: url('rupee.png');
    display:block; 
    background-repeat: no-repeat;
}
查看更多
5楼-- · 2019-01-05 09:36

This can be sought of a temporary solution. Unicode has accepted U+20B9 as Indian rupee symbol soon all systems will update themselves

查看更多
相关推荐>>
6楼-- · 2019-01-05 09:38

There are two html entity code : &#x20b9; &#8377;

查看更多
仙女界的扛把子
7楼-- · 2019-01-05 09:38

use this new unicode char: &#x20b9;

查看更多
登录 后发表回答