URL 编码

黎 浩然/ 21 6 月, 2022/ 安全/SECURITY, 密码学/CRYPTOGRAPHY, 计算机/COMPUTER/ 0 comments

Javascript 有两个常用的URI编码函数:encodeURI和encodeURIComponent

encodeURI方法不会对下列字符编码

英文字母 阿拉伯数字 ~!@#$&*()=:/,;?+’

encodeURIComponent方法不会对下列字符编码

英文字母 阿拉伯数字 ~!*()’

所以encodeURIComponent比encodeURI编码的范围更大。

https://tool.oschina.net/encode?type=4

Share this Post

Leave a Comment

您的邮箱地址不会被公开。 必填项已用 * 标注

*
*