Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/250.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 如何等待mysql查询继续_Javascript_Php_Mysql_Axios_Settimeout - Fatal编程技术网

Javascript 如何等待mysql查询继续

Javascript 如何等待mysql查询继续,javascript,php,mysql,axios,settimeout,Javascript,Php,Mysql,Axios,Settimeout,我有js代码: axios.get(`./index.php?deleteMany=${arrChecked}`); // automaticaly reload page,but MySQL queries in index.php don't applied and I need to reload by refresh 备选方案: e.preventDefault() axios.get(`./index.php?deleteMany=${arrChecked}`); setT

我有js代码:

 axios.get(`./index.php?deleteMany=${arrChecked}`); // automaticaly reload page,but MySQL queries in 
index.php don't applied and I need to reload by refresh
备选方案:

 e.preventDefault()
 axios.get(`./index.php?deleteMany=${arrChecked}`);
 setTimeout(function(){ location.reload() }, 3000); // No need to reload by refresh
您的评论是“自动重新加载页面”……但Axios发出Ajax请求。因此它不会自动重新加载页面。这就是AJAX的全部要点。如果您不想这样做,那么以正常方式发布数据,而不使用AJAX。现在还不清楚你到底希望得到什么样的请求流。