您现在的位置是:首页 > 电脑技术查询 > web开发

jquery ajax 回调函数 返回乱码?解决思路

编辑:chaxungu时间:2022-10-02 23:15:17分类:web开发

jquery ajax 回调函数 返回乱码?
JScript code var url = "login?userName=" + encodeURI(encodeURI($("#userName").val())); url = convertURL(url); $.get(url,null,function(data){ alert(decodeURI(data)); $("#result").html("<font color=red>"+decodeURI(decodeURI(data))+"</font>");});
PrintWriter out=response.getWriter();
response.setContentType("text/html;charset=utf-8");
out.print("用户名不存在");

我都设为utf-8了 还是 返回????

------解决方案--------------------
html
后台
文件 编码需一致