コールバック関数はデータをテキストとして返しますが、コールバック関数はそれを認識せず、常に else 条件を実行します。
ここに私の「呼び出し」パラメータがあります
$.post('ajaxupdate.php', data, handleAjaxResponse, 'text');
私のコールバック関数は次のとおりです。
function handleAjaxResponse(response) {
if (response == 'worked') {
alert("hi");
}else{
console.log(response);
};
} // End of handleAjaxResponse() function.
私のphp echo
はjQueryの成功に関する文字列コードです。