URL 编解码

URL / URI 组件的编码与解码

encodeURI / decodeURI
编码完整 URL,保留 : / ? & = # 等保留字符。适合整条 URL。
encodeURIComponent / decodeURIComponent
编码 URL 组件,所有特殊字符都会被编码。适合查询参数值。