摘要: 1、charCodeAt方法返回一个整数,代表指定位置字符的Unicode编码。strObj.charCodeAt(index)说明:index将被处理字符的从零开始计数的编号。有效值为0到字符串长度减1的数字。如果指定位置没有字符,将返回NaN。例如: var str = "ABC"; str.charCodeAt(0);结果:652、fromCharCode方法从一些Unicode字符串中返回一个字符串。String.fromCharCode([code1[,code2...]])说明:code1,code2...是要转换为字符串的Unicode字符串序列。如果没有参数 阅读全文
posted @ 2012-01-18 15:53 前端咖 阅读(6914) 评论(1) 推荐(1) 编辑