晴明的博客园 GitHub      CodePen      CodeWars     

[javascript]字符串和unicode之间的转换

"西瓜".charCodeAt(0); //35199

"西瓜".charCodeAt(1); //29916

 

String.fromCharCode(35199,29916) //西瓜

 

posted @ 2016-01-21 14:12  晴明桑  阅读(105)  评论(0编辑  收藏  举报