简体   繁体   中英

how can i convert ascii code to character in javascript

我怎样才能将ascii代码转换为javascript中的字符

String.fromCharCode(ascii_code)

If you want to convert Ascii Codes to Characters you can use:

String.fromCharCode(codes);

For Example:

String.fromCharCode(65,66,67);

which returns = "ABC"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM