关于url传值乱码问题
function getEncodeURI(content) { content = encodeURI(content);//已把%号转为%25 //content = content.replace(/\%/g, "%25"); content = content.replace(/\+/g, "%2B"); content = content.replace(/\ /g, "%20"); content = content.replace(/\//g, "%2F"); content = content.replace(/\#/g, "%23"); content = content.replace(/\&/g, "%26"); content = content.replace(/\=/g, "%3D"); content = content.replace(/\?/g, "%3F"); return content;}?
然后,再传值之前,参数先通过getEncodeURI(content)方法处理一下。
?
原因呢 ? 还在深究中