fromCharCode 方法
更新:2007 年 11 月
从一些 Unicode 字符值中返回一个字符串。
function fromCharCode([code1 : Number [, ... [, codeN : Number]]]]) : String
参数
- code1, ... , codeN
可选项。要转换为字符串的 Unicode 字符值序列。如果没有给出参数,结果为空字符串。
备注
fromCharCode 方法是从全局 String 对象中调用的。
示例
在下面的示例中,test 赋给“plain”字符串:
var test = String.fromCharCode(112, 108, 97, 105, 110);