Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/398.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 尝试在AJAX中每次更新列表_Javascript_Php_Sql_Ajax - Fatal编程技术网

Javascript 尝试在AJAX中每次更新列表

Javascript 尝试在AJAX中每次更新列表,javascript,php,sql,ajax,Javascript,Php,Sql,Ajax,这是我的代码,但无法更新我的页面 setInterval(function getServer() { var xmlhttp = new XMLHttpRequest(); if (this.readyState == 4 && this.status == 200) { document.getElementById("1").innerHTML = this.responseText;} xmlhttp.open(

这是我的代码,但无法更新我的页面

 setInterval(function getServer() {
 var xmlhttp = new XMLHttpRequest();
        if (this.readyState == 4 && this.status == 200) {
            document.getElementById("1").innerHTML =      this.responseText;}

  xmlhttp.open("POST", "pedip.php", true);
  xmlhttp.send();    
  }, 30000)

在browser developer tools控制台或网络选项卡中,您会收到什么错误消息?粘贴您的html代码以确定此函数是否正常工作。在您定义的每个时间跨度上进行的ajax调用与您的pedip.php中的问题类似