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
}
});
}
이 작업을 수행하는 쉬운 방법이 있습니까?