url编码有个bug,不能直接用decodeURIComponent,如果遇到前面的$会报错。

decodeURIComponent("%") ----->Uncaught URIError: URI malformed

decodeURIComponent("%25") ----->%

  

decodeURLComponent(escape(’%’))

  

原文地址:https://www.cnblogs.com/alone2015/p/5837493.html