首页 > 学院 > 开发设计 > 正文

fromCharCode 方法

2019-11-17 06:02:35
字体:
来源:转载
供稿:网友

 

从一些 Unicode 字符值中返回一个字符串。

String.fromCharCode([code1[, code2[, ...[, codeN]]]])

参数

String

必选项。为 String 对象。

code1, . . . , codeN

可选项。是要转换为字符串的 Unicode 字符值序列。假如没有给出参数,结果为空字符串。

说明

在调用 fromCharCode 前不必创建 String 对象。

在下面的例子中,test 包含字符串 "plain":

var test = String.fromCharCode(112, 108, 97, 105, 110);


上一篇:fontsize 方法

下一篇:eval 方法

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表