传中文查询乱码问题 则需要对要传的参数进行二次编码 例如 window.location.href ="/xx.jsp?name="+name+""; 这样子则会乱码 改成 window.location.href ="/xx.jsp?name="+ encodeURI(encodeURI(name))+""; 在接受的jsp页面 或者是controller 中进行解码 String name = java.net.URLDecoder.decode(request.getParameter("name"), "utf-8"); 这样子即解决在用 window.location.href 传中文的乱码问题
页面传递中文乱码处理
转来的,好用
猜你喜欢
转载自451640893.iteye.com/blog/2396855
今日推荐
周排行