js中转化char和int
js中转化char和int
var chr ='a';
console.log(chr.charCodeAt(0)); // output 97
var i=97;
console.log(String.fromCharCode(i)); //output 'a'
js中转化char和int
var chr ='a';
console.log(chr.charCodeAt(0)); // output 97
var i=97;
console.log(String.fromCharCode(i)); //output 'a'