<script>
let a = "";
for (var i = 65; i < 91; i++) {
a += String.fromCharCode(i);
}
alert(a);
//大写字母A到Z的ascii码是从65到90
//小写字母a到z的ascii码是从97到122
</script>
<script>
let a = "";
for (var i = 65; i < 91; i++) {
a += String.fromCharCode(i);
}
alert(a);
//大写字母A到Z的ascii码是从65到90
//小写字母a到z的ascii码是从97到122
</script>
转载于:https://www.cnblogs.com/cq1715584439/p/10645713.html