var tempStr="A";
console.log(tempStr.charCodeAt());// 65 ,转ASCII码
console.log(String.fromCharCode(65));// A ,ASCII码转成字符
//循环输出 A~Z
for(var i=0;i<26;i++){
console.log(String.fromCharCode(65+i))
}
原文地址:https://www.cnblogs.com/stones-dream/p/10300127.html
时间: 2024-11-04 06:16:09