用jq编码解码一个url地址

介绍一下编码解码函数对

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

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

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

posted @ 2018-08-10 21:52  srckeeper  阅读(756)  评论(0编辑  收藏  举报