前端、后台传递中文参数,乱码的情况:
var a="参数乱码";
//编译两次
window.location.href=encodeURI(encodeURI("http://127.0.0.1:8080/c.do?title="+a));
后台接收的操作
String title = request.getParameter("title");
String encode = URLDecoder.decode(title, "UTF-8");