私はjQueryの$に.get要求の結果に基づいて、関数の戻り値を決定しようとしています:
function checkResults(value) {
$.get("checkDuplicates.php", {
value: value
}, function(data) {
if(data == "0") {
//I want the "checkResults" function to return true if this is true
} else {
//I want the "checkResults" function to return false otherwise
}
});
}
は、これを行うための簡単な方法はありますか?