TaRRuZ adlı üyeden alıntı:
mesajı görüntüle
17
●248
$('.button').click(function (e) {
e.preventDefault();
$('.button').text('Lütfen Bekleyin');
$('.button').prop('disabled', true);
let form = $('#form').serialize();
$.ajax({
type: 'POST',
url: 'result.php',
data: form,
dataType: 'json',
success: function (data) {
if (data.success) {
$('.button').prop('disabled', false);
$('.button').text('Sorgula');
console.log('ok');
} else {
$('.button').prop('disabled', false);
$('.button').text('Sorgula');
console.log('error');
}
}
});
});