function encodeURI(str){ return encodeURI(str); } //url解码 function decodeURI(str){ decodeURI(str); } 页面实现效果:url在线编码解码-小工具在线(xgjzx.cn)