Javascript xmlhttp请求问题

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);<<

这是我的xmlhttp JavaScript函数:

          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);
            }
  • 发送参数失败,我不知道如何测试

  • noob.php无法识别发送的字符串(不知何故-可能是因为发送的格式错误?)

  • 问题是参数没有插入到表中。那么,上面哪种可能的选择是正确的呢

    所有noob.php的代码都正常工作,我用一个html表单试过了。所以 可能的错误在于:

    xmlHttp2.onreadystatechange = stateChanged2;
    xmlHttp2.send(params);
    
    大多数情况下,通过在可疑线路后放置警报,可以轻松识别此类问题


    因此,在您对
    xmlHttp2.send(params)有任何疑问之前首先在
    xmlHttp2.onreadystatechange=stateChanged2之后放置警报如果警报未出现,则转到功能
    状态更改的位置2并再次使用警报对其进行调查(最有可能是该函数中存在问题,那里一定有错误)

    你问过这个问题吗?我不知道如何测试,看看Firebug:。。。我猜你就是问另一个问题的那个人。正如我在评论中所说,我们帮不了你多少忙。您必须自己进行一些调试,我们无法为您执行此操作。您的查询不起作用。请张贴示例结果。
    xmlHttp2.onreadystatechange = stateChanged2;
    xmlHttp2.send(params);
    
    xmlHttp2.onreadystatechange = stateChanged2; 
    xmlHttp2.send(params);