tir*_*hen 1 javascript character utf-8 utf node.js
我正在尝试使用变量和\ u来创建Node.js的UTF字符.
var code = '0045';
console.log('\u0045', '\u' + code);
Run Code Online (Sandbox Code Playgroud)
但输出变成了
E u0045
Run Code Online (Sandbox Code Playgroud)
我该怎么做
E E
Run Code Online (Sandbox Code Playgroud)
如何创建角色并将其存储在变量中?
用途String.fromCharCode:
String.fromCharCode(0x0045)
String.fromCharCode(parseInt('0045', 16))
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
789 次 |
| 最近记录: |