-5

次のような基本的な AJAX リクエストがあります。

    $.ajax({
        url: 'check_password.php',
        type: 'post',
        data: 'password='+password,
        dataType: 'json',
        success: function(json) {
            if (json['success']) {
               //Continue with default action
            }else{
                //Password is invalid, stop the script and return an error
                preventDefault();
                $(".error").show();
            }
        }
4

1 に答える 1