通常前端页面传递汉字参数值方式为:xxx.action?key='',对于传递汉字乱码的解决办法:
js编码:xxx.action?key=encodeURI(encodeURI('参数值'));
java后台解码:key=URLDecoder.decode(request.getPramater("key"),"UTF-8");
通常前端页面传递汉字参数值方式为:xxx.action?key='',对于传递汉字乱码的解决办法:
js编码:xxx.action?key=encodeURI(encodeURI('参数值'));
java后台解码:key=URLDecoder.decode(request.getPramater("key"),"UTF-8");
转载于:https://www.cnblogs.com/sunyt/p/4563272.html