decodeURIComponent(q.replace(/\+/g, "");

带全局标志/g,全局替换

无全局标志/g,只替换第一个匹配的返回结果字符串

 

posted on 2021-07-09 20:27  ♩♪♫♬  阅读(169)  评论(0)    收藏  举报