char 2 Ascii code & Ascii code to char

Refer to http://stackoverflow.com/questions/94037/convert-character-to-ascii-code-in-javascript

The second answer

 

"ABC".charCodeAt(0)// returns 65

String.fromCharCode(65,66,67);// returns 'ABC'

posted @ 2012-08-21 13:40  webglcn  阅读(340)  评论(0编辑  收藏  举报