印度卢比的 HTML 代码

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3430242/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 04:01:33  来源:igfitidea点击:

HTML code for INR

html

提问by Bharanikumar

For pound (£) there is HTML code £.

对于英镑 (£),有 HTML 代码£

For INRcan you please tell me the HTML code?

对于INR,你能告诉我 HTML 代码吗?

回答by Smilla J.

You can use the following HTML snippet:

您可以使用以下 HTML 代码段:

<p>Price &#x20b9; 9500 = &#x20b9; 9500</p>
<p>Price &#8377; 5500 = &#8377; 5500</p>
<p>Price &#8360; 500 = &#8360; 500</p>
<p>Price &#x20a8; 2000 = &#x20a8; 2000</p>

回答by Prasanth M

?? Indian rupee sign. HTML: &#8377;— ₹ or &#x20B9;— also ₹, corresponding to Unicode U+20B9.

?? 印度卢比符号。HTML:&#8377;— ₹ 或&#x20B9;— 也 ₹,对应于 Unicode U+20B9。

回答by Pekka

The indian rupee sign is pretty new (introduced this Julyif I read it correctly) and doesn't even have a Unicode position yet, much less a HTML entity.

印度卢比符号很新(如果我没看错的话,是今年 7 月推出的),甚至还没有 Unicode 位置,更不用说是 HTML 实体了。

Even when it gets a Unicode position, it will probably still take years until it can be reliably used on a web page, because the client computers' Fonts will need to be updated accordingly. (I could imagine a font-faceworkaround with a custom font, though.)

即使它获得了 Unicode 位置,可能仍需要数年时间才能在网页上可靠地使用它,因为客户端计算机的字体需要相应地更新。(不过,我可以想象一种font-face使用自定义字体的解决方法。)

Wikipedia uses an image file to display the symbol. It's far from good, but it may be the best workaround at the moment.

维基百科使用图像文件来显示符号。这远不是很好,但它可能是目前最好的解决方法。

The generic rupee sign has three Unicode characters. See here.

通用卢比符号具有三个 Unicode 字符。见这里

回答by Mark Byers

No! You should avoid using HTML entities.

不!您应该避免使用 HTML 实体

Instead of using HTML entities for symbols you should just put those symbols directly into your text and correctly encode your document.

不应使用 HTML 实体作为符号,而应将这些符号直接放入文本并正确编码文档

  • Instead of using &pound;you should use the character .
  • For rupee there is no Unicode character. You can use a PNG file instead rupee. Alternatively you can use the unicode character ??which is currently the most commonly used single character for rupee. Other alternatives are using INR, Rs.or rupees.
  • &pound;您应该使用字符而不是使用
  • 对于卢比,没有 Unicode 字符。您可以改用 PNG 文件卢比。或者,您可以使用 unicode 字符??,这是目前卢比最常用的单个字符。其他替代方法是使用INR,Rs.rupees

When the new Unicode symbol for the Indian Rupee is introduced then could use that instead (but note that it will be a while before all browsers support it).

当引入印度卢比的新 Unicode 符号时,可以改用它(但请注意,在所有浏览器都支持它之前还需要一段时间)。

回答by Rohit Suthar

Please try this -

请试试这个 -

INR (₹) sign HTML Code - &#x20B9;

INR (₹) 签署 HTML 代码 - &#x20B9;

回答by Puneet

Use this for Indian rupee sign:

将此用于印度卢比符号:

&#2352;— र

&#2352;— र

回答by Penny Liu

Here is one more example based on Intl.NumberFormatnative api.

下面是一个基于Intl.NumberFormat原生 api 的示例。

var number = 123456.789;

// India uses thousands/lakh/crore separators
console.log(new Intl.NumberFormat('en-IN', {
  style: 'currency',
  currency: 'INR',
  // limit to six significant digits (Possible values are from 1 to 21).
  maximumSignificantDigits: 6
}).format(number));

回答by J. Vas

just add &#8377 with semicolon where ever you want to display the rupee sign it worked for me

只需在您想要显示它对我有用的卢比符号的地方添加带有分号的 ₹

回答by Satya Prakash Nigam

How about using fontawesome icon for Indian Rupee (INR).

如何为印度卢比 (INR) 使用 fontawesome 图标。

Add font awesome CSS from CDN in the Head section of your HTML page:

在 HTML 页面的 Head 部分添加来自 CDN 的字体真棒 CSS:

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

And then using the font like this:

然后使用这样的字体:

<i class="fa fa-inr" aria-hidden="true"></i>

回答by David

According to Wikipedia, the new rupee sign hasn't been added to Unicode yet (U+20B9 ₹ was added to Unicode in late 2010), so you can't use it from HTML. The old (unofficial) symbol is &#x20a8; — ₨.

根据Wikipedia,新的卢比符号尚未添加到 Unicode(U+20B9 ₹ 在 2010 年末添加到 Unicode),因此您无法从 HTML 中使用它。旧的(非官方)符号是 ₨ — ₨.