doc: Update javascript.md (#72)

decodeURI(enc); encodeURI(uri); 注释修正
This commit is contained in:
Jason Zhuang 2022-11-15 08:51:15 +08:00 committed by GitHub
parent 2200972ce7
commit edaf531b50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -219,9 +219,9 @@ String(23);
(23).toString();
// 从字符串返回数字
Number("23");
// 解码 URI。 结果:“我的 page.asp”
// 解码 URI。 结果:“my page.asp”
decodeURI(enc);
// 编码 URI。 结果“my%page.asp”
// 编码 URI。 结果“my%20page.asp”
encodeURI(uri);
// 解码 URI 组件
decodeURIComponent(enc);