JS中的decodeURIComponent和encodeURIComponent

两个函数可以对特定函数生成的密码字符串进行解密操作,就可以生成为未解密的字符串

使用方法:

//加密
encodeURIComponent("http://www.cnblogs.com/7night")

结果:

//解密
decodeURIComponent("http%3A%2F%2Fwww.cnblogs.com%2F7night ")

结果:

原文地址:https://www.cnblogs.com/cnsevennight/p/3939867.html