- 将字母转为ascii码的方法:
var MrFlySand = "A";
MrFlySand.charCodeAt();// 65
var FlySand= 'a';
FlySand.charCodeAt();// 97
- 将ascii码转为对应字母的方法:
var MrFlySand = 97;
String.fromCharCode(MrFlySand); // 'a'
var FlySand = 100;
String.fromCharCode(FlySand); // 'd'
❤️本文来自作者:MrFlySand