ajax语法

发布时间 2023-07-12 08:56:47作者: 大da脸
$.ajax({
                type: 'POST',
                url: url,
                dataType: 'json',
                data: {
                    contacts: contacts,
                    mobile: mobile,
                    content: content,
                    checkcode: checkcode
                },
                success: function(response, status) {
                    //成功操作
                },
                error: function(xhr, status, error) {
            //失败操作 alert(
'网络异常,请稍后重试'); } });