0
我的兄弟写的代码之前的工作,但我想我改变了他的错误,也许你可以看到他为什么不会返回XML数据。XML HTTP只需要返回未定义
function CheckFromTo(From,To)
{
//alert(From + "," + To);
var xmlHttp = null;
var Url = "http://www.fpl.co.il/bo/info/CheckFromTo.aspx?FROM=" + From + "&TO=" + To + "";
xmlHttp = new XMLHttpRequest();
xmlHttp.onreadystatechange = ProcessRequest;
xmlHttp.open("GET", Url, true);
xmlHttp.send(null);
return (ProcessRequest());
function ProcessRequest()
{
if (xmlHttp.readyState == 4 && xmlHttp.status == 200)
{
var response = xmlHttp.responseText;
return response;
}
}
}
你是怎么调用CheckFromTo()函数的?你结果怎么样? – FixMaker
问你兄弟看看'return response;' – KooiInc