字符串转Unicode码
生活随笔
收集整理的這篇文章主要介紹了
字符串转Unicode码
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
var?str?=?'中';
var?charCode?=?str.charCodeAt(0);
console.log(charCode);?//?=>?20013;
str.charCodeAt(0).toString(16);//=>"4e2d"
?
轉載于:https://www.cnblogs.com/alvin553819/p/7127312.html
總結
以上是生活随笔為你收集整理的字符串转Unicode码的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: vijos 观光旅游 最小环fl
- 下一篇: SD从零开始01-02