Home >Web Front-end >JS Tutorial >Function example code for converting characters into ASCII values ​​in JS_javascript skills

Function example code for converting characters into ASCII values ​​in JS_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:13:321076browse

Character to ascii code: use charCodeAt();
ascii code to character: use fromCharCode();

Look at a small example

Copy the code The code is as follows: