ajax 返回值为乱码
var Xmlhttp;function Xmlhttp_conn()
{
if(window.ActiveXObject)
{
Xmlhttp=new ActiveXObject('Microsoft.XMLHTTP');
Xmlhttp.setRequestHeader("Content-Type", "gb2312");
}
else if(window.XMLHttpRequest)
{
Xmlhttp=new XMLHttpReques();
}
}
function yidong(url)
{
Xmlhttp_conn();
Xmlhttp.open("get","show.php?type=yidong&page="+url,true)
Xmlhttp.onreadystatechange=function()
{
var php1000 = Xmlhttp.responseText;
document.getElementById("yidong").innerHTML = php1000;
};
Xmlhttp.send(null);
}
在show.php页面获得的汉字后,在
<div id="yidong"></div>
index.php页面显示为乱码,大家帮下忙呀