后台向前台传输乱码问题
解决办法:
HttpServletResponse response=ServletActionContext.getResponse();
response.setContentType("text/html; charset=utf-8");
前台向后台传递中文参数乱码问题
解决办法:
1、对url进行两次编码!两次!两次!两次!重要的事情要重复三遍!
var url= "/programList/pgList/programActionUpdate.action?bh="+row.bh+"&pdid="+pdid+"&pdmc="+pdmc+"&xh="+xh+"&fs="+fs+"&broadcastDate="+broadcastDate
+"&broadcastTime="+broadcastTime+"&jmmc="+jmmc+"&sc="+sc+"&spy="+spy+"&spy="+spy+"&jmlx="+jmlx+"&importTime="+importTime;
url=encodeURI(url);
url=encodeURI(url);
2、后台接收后再解码
java.net.URLDecoder.decode(this.fs,"utf-8")
详情:http://fluagen.blog.51cto.com/146595/204395