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

时间:2022-04-11 15:54:33

how can i convert ascii code to character in javascript

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

2 个解决方案

#1


70  

String.fromCharCode(ascii_code)

#2


1  

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

如果您想将Ascii代码转换为字符,您可以使用:

String.fromCharCode(codes);

For Example:

String.fromCharCode(65,66,67);

which returns = "ABC"

#1


70  

String.fromCharCode(ascii_code)

#2


1  

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

如果您想将Ascii代码转换为字符,您可以使用:

String.fromCharCode(codes);

For Example:

String.fromCharCode(65,66,67);

which returns = "ABC"