javascript 如何在 highcharts 标题中添加版权符号?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8095624/
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
how to add copyright symbol in a highcharts title?
提问by kennebec
If I add ©
it shows up as ©
instead of the copyright symbol. Is there any way to add html special chars?
如果我添加©
它显示为©
而不是版权符号。有没有办法添加html特殊字符?
回答by kennebec
html entities (©
) need to be added as innerHTML. For text, use Unicode:
html 实体 ( ©
) 需要添加为innerHTML。对于文本,请使用 Unicode:
alert('\u00A9')
回答by Ash
You can use one of these options.
您可以使用这些选项之一。
- \251is the octal sequence
- \xA9is the hexadecimal sequence
- \u00A9is the Unicode sequence
- \251是八进制序列
- \xA9是十六进制序列
- \u00A9是 Unicode 序列
for example alert('\251');
例如alert('\251');