ajax请求模板

$.ajax({
        type: 'get',
        url : '/api/species',
        //url: '/api/one/new/list?p=1',
        data: sendData,
        dataType: 'json',
        success: function (data) {
            if (data) {
                //请求成功
            } else {
                alert(data.msg);
            }
        },
        error: function () {
            //alert("");
        }
    });

 

posted @ 2020-04-27 20:25  山…隹  阅读(176)  评论(0编辑  收藏  举报