用jq编码解码一个url地址

介绍一下编码解码函数对

1.    escape /unescape   主要用于汉字编码,返回字符的unicode编码值, 对“+”不能编码 

       

        

2.     encodeURI / decodeURI  用于对url进行编码,但对特殊字符如+ ? # @ & 等不能编码

        

3,      encodeURIComponent /decodeURIComponent    用于对url进行编码,可以对特殊字符进行编码 

         

原文地址:https://www.cnblogs.com/ruoshui-llj/p/5826321.html