js 字符与ASCII码互转
将字符转为ASCII码
var str = "A"; str.charCodeAt(); // 65 var str1 = 'a'; str1.charCodeAt(); // 97
将ASCII码转为字符
var num = 97; String.fromCharCode(num); // 'a' var num1 = 100; String.fromCharCode(num1); // 'd'
参考文章: http://blog.csdn.net/xiaobing_hope/article/details/78645273
fromCharCode