服务器返回的数据与XMLHttpRequest接收到的数据怎么不一样啊?
客户端脚本
<script language= "javascript " type= "text/javascript ">
function GetAjaxValue(url)
{
var randomNum = Math.random();
var objXMLHttp;
if(window.ActiveXObject)
{
xmlHttp = new ActiveXObject( "Microsoft.XMLHTTP ");
}
else if(window.XMLHttpRequest)
{
xmlHttp = new XMLHttpRequest();
}
xmlHttp.Open( "GET ",url,false);
xmlHttp.Send(null);
var returnValue;
if(xmlHttp.readyState == 4)
{
if(xmlHttp.status == 200)
{
returnValue = xmlHttp.responseText;
}
else
{
returnValue = xmlHttp.responseText;
}
}
else
{
returnValue = xmlHttp.responseText;
}
return(returnValue);
}