js中对url进行编码解码的方法

只针对文本编码 encodeURI() 
只针对文本解码 decodeURI()
针对文本和特殊字符的编码  encodeURIComponent()
针对文本和特殊字符的解码  decodeURIComponent()

原文地址:https://www.cnblogs.com/ginelle/p/13518185.html