1.java后台进行编码与解码
URLEncoder.encode(str,“utf-8”);//编码
URLDecoder.decode(str,“utf-8”);//解码
2.jsp页面进行编码解码
encodeURI(str);//编码
encodeURIComponent(str);//编码
decodeURI(str);//解码
1.java后台进行编码与解码
URLEncoder.encode(str,“utf-8”);//编码
URLDecoder.decode(str,“utf-8”);//解码
2.jsp页面进行编码解码
encodeURI(str);//编码
encodeURIComponent(str);//编码
decodeURI(str);//解码