字符转ascii码:用charCodeAt();
ascii码砖字符:用fromCharCode();
 
看一个小例子
<script>
str="A";
code = str.charCodeAt(); 
str2 = String.fromCharCode(code);
str3 = String.fromCharCode(0x60+26);

document.write(code+'<br />');
document.write(str2+'<br />');
document.write(str3);
</script>

输出:
65
A
z

相关文章:

  • 2022-12-23
  • 2022-01-25
  • 2021-10-06
  • 2021-06-16
  • 2022-12-23
  • 2021-11-12
  • 2021-05-19
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-03
  • 2021-07-04
相关资源
相似解决方案