当前位置: 代码迷 >> Ajax >> xmlhttp 中文乱码解决方案
  详细解决方案

xmlhttp 中文乱码解决方案

热度:662   发布时间:2013-12-26 00:35:35.0
xmlhttp 中文乱码
xmlhttp 中文乱码

    xmlhttp.open("Post", url, true); //--只发送
       xmlhttp.onreadystatechange = handleStateChange; 
    xmlhttp.send(null);

xmlhttp.responsetext 中文乱码

怎么转换啊 

------解决方案--------------------
url地址返回utf-8格式的编码内容即可
------解决方案--------------------
服务端返回的数据如果不是 utf-8 的,则需要同时返回声明语言类型的头
  相关解决方案