标签:
js代码
function editImage(userName){
var userName1= encodeURI(userName);//中文转码
userName1 = userName1.replace("+","%2B");//防止web容器自动转码
userName1 = userName1.replace(/%/g,"@");//防止web容器自动转码
}
java代码
userName = java.net.URLDecoder.decode(userName.replaceAll("@", "%"),"utf-8");
标签:
原文地址:http://www.cnblogs.com/ddfan/p/4530566.html