所以我的javascript文件中有这个函数:
function UpdateThisCourseHistory(){
var ajax= new Ajax.Request("runNeededQueries.php",
{
method: "POST",
parameters: {database: "history", action:"update"},
onSuccess: function(){alert("This Course History Entry Has Been Updated");},
onFailure: function(){alert("Could Not Find The Entry With The Specified Primary Key");}
}
);
}
假设这是我的 php 文件
<?php
header('HTTP/1.0 400 Bad Request');
?>
这会使 onFailure 方法执行吗?