警报不适用于AJAX成功

Suk*_*ene -1 javascript c# ajax asp.net-mvc jquery

我有AJAX脚本将数据写入表

这是代码

<script>
$('#save_appointment').click(function () {
    addAppointmentInternal();
});
function addAppointmentInternal() {
    $.ajax({
        type: 'Post',
        dataType: 'Json',
        data: {
            Start: $('#startAppointment').val(),
            End: $('#endAppointment').val(),
            Title: $('#title').val()
        },
        url: '@Url.Action("AddingInternalAppointment","Calendar")',
        sucess: function (da) {
            if (da.Result === "Success") {
                alert();
            } else {
                alert('Error' + da.Message);
            }
        },
        error: function(da) {
            alert('Error');
        }
    });
}
Run Code Online (Sandbox Code Playgroud)

这是后端的代码

 public ActionResult AddingInternalAppointment(string Start, string End, string Title)
    {
        Appointment appointment = new Appointment()
        {
            Start_appointment = Start,
            End_appointment = End,
            Title = Title
        };
        db.Appointments.Add(appointment);
        db.SaveChanges();
        return Json(new { Result = "Success", Message = "Saved Successfully" });
    }
Run Code Online (Sandbox Code Playgroud)

一切都还好.数据写入表格.但我有问题,成功后我没有收到警报信息.

哪里可以有问题?

Har*_*ngh 5

success:ajax成功的拼写错误.你正在使用成功.检查并纠正它.

更改

sucess: function (da) {
Run Code Online (Sandbox Code Playgroud)

success: function (da) {
Run Code Online (Sandbox Code Playgroud)