Javascript xmlhttp请求问题
这是我的xmlhttp JavaScript函数:Javascript xmlhttp请求问题,javascript,ajax,xmlhttprequest,Javascript,Ajax,Xmlhttprequest,这是我的xmlhttp JavaScript函数: var params = "a=" + encodeURIComponent(a) + "&b=" + encodeURIComponent(b) + "&c=" + encodeURIComponent(c); var url = "noob.php"; xmlHttp2.open("POST", url, true);<<
var params = "a=" + encodeURIComponent(a)
+ "&b=" + encodeURIComponent(b)
+ "&c=" + encodeURIComponent(c);
var url = "noob.php";
xmlHttp2.open("POST", url, true);<<<<up till here also no prob,did some testing
xmlHttp2.onreadystatechange = stateChanged2;
xmlHttp2.send(params);
}
xmlHttp2.onreadystatechange = stateChanged2;
xmlHttp2.send(params);
大多数情况下,通过在可疑线路后放置警报,可以轻松识别此类问题
因此,在您对
xmlHttp2.send(params)有任何疑问之前代码>首先在xmlHttp2.onreadystatechange=stateChanged2之后放置警报代码>如果警报未出现,则转到功能状态更改的位置2声明code>并再次使用警报对其进行调查(最有可能是该函数中存在问题,那里一定有错误) 你问过这个问题吗?我不知道如何测试,看看Firebug:。。。我猜你就是问另一个问题的那个人。正如我在评论中所说,我们帮不了你多少忙。您必须自己进行一些调试,我们无法为您执行此操作。您的查询不起作用。请张贴示例结果。
xmlHttp2.onreadystatechange = stateChanged2;
xmlHttp2.send(params);
xmlHttp2.onreadystatechange = stateChanged2;
xmlHttp2.send(params);