其他分享
首页 > 其他分享> > jquery ajax跨域回调

jquery ajax跨域回调

作者:互联网

$.ajax({
        type: "GET",
        url: "http://110.188.70.244:8090/idp/restful/getIDPToken",
        dataType: 'jsonp',
        data: {
            appId: 'xxhxm',
            remoteIp: '127.0.0.1'
        },
        jsonp: 'jsonpCallback',
        jsonpCallback: 'successCallback',
        success: function(response){
            console.log(response);
        },
        error:function(jqXHR, textStatus, errorThrown){
            console.log(jqXHR);
            console.log(textStatus);
            console.log(errorThrown);
        }
    });

    function successCallback(r){
        console.log(222)
    }

 

标签:jquery,function,errorThrown,console,跨域,successCallback,jqXHR,ajax,log
来源: https://www.cnblogs.com/zsy0712/p/10490718.html