名称空间(Namespace): html

x.encoding. html

html 编码管理

方法(Methods)

<static> decode(text)

html 解码
参数(Parameters):
名称 类型 描述
text string 文本信息

<static> encode(text)

html 编码
参数(Parameters):
名称 类型 描述
text string 文本信息
示例(Example)
// 输出格式 <p>hello</p>
console.log(x.encoding.html.encode('<p>hello</p>'));