1、先编码:namessss= encodeURI(namessss);2、后转义,将编码转换成字符 function getCharFromUtf8(str) { return decodeURI(str);}