我在jQuery中遇到这个错误:
无法加载资源:net :: ERR_CONNECTION_RESET
使用post方法在java中执行apache2服务器。
$(document).on("click", "#restartServer", function() {
$.post('/advyteam/ajax/admin/serverRestart',function() {})
$.done(function() {
//do something
})
$.fail(function(){
// do something when post failed
})
})
但问题是当我发布它的工作正确但我得到.fail
块中的代码并非如此。