Ajax中文参数乱码

hugebait 2012-06-15

Ajax发送端应该把包含有中文参数的url编码2次如下

var url="savePoints.jsp?test=......... url=encodeURI(encodeURI(url)); //一定要是2层编码

String info = java.net.URLDecoder.decode(request.getParameter("test"),"utf-8"); //action接收端解码

相关推荐

mmywcoco / 0评论 2020-06-06