标签:tostring nic unicode arc ring nbsp log code var
var str = ‘中‘;
var charCode = str.charCodeAt(0);
console.log(charCode); // => 20013;
str.charCodeAt(0).toString(16);//=>"4e2d"
标签:tostring nic unicode arc ring nbsp log code var
原文地址:http://www.cnblogs.com/alvin553819/p/7127312.html