日期:2014-05-16  浏览次数:20282 次

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
后台
文件 编码需一致