Skip to content

URI 编码

URI 编码

URI 方法能对所有的 Unicode 码进行编码,escape & unescape 基本别废弃,它只对 ASCII 码进行编码

unescape

ASCII 编码

escape

ASCII 解码

encodeURI

不会对本身属于 URI 特殊字符进行编码

URI 特殊字符:冒号(😃 井号(#) 正斜杠(/) 问号(?)

decodeURI

解码

encodeURIComponent

所有非标准字符编码

decodeURIComponent

解码

Released under the MIT License.