str.charCodeAt(index) 返回索引index的字符编码
str.charAt(index) 返回索引index指定的字符
String.fromCharCode(num) 返回字符编码为num的字符
var str = 'this is a str'
undefined
str.charCodeAt(5)
105
str.charAt(5)
"i"
String.fromCharCode(105)
"i"
str.charCodeAt(index) 返回索引index的字符编码
str.charAt(index) 返回索引index指定的字符
String.fromCharCode(num) 返回字符编码为num的字符
var str = 'this is a str'
undefined
str.charCodeAt(5)
105
str.charAt(5)
"i"
String.fromCharCode(105)
"i"