javascript 字元轉換為ascii碼,ascii碼轉換為字元

洋蔥土豆隨心匠發表於2016-11-15
<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>

  

相關文章