jQuery AJAX status “200 OK”, but no data response

前端 未结 3 1677
误落风尘
误落风尘 2021-01-05 12:40

jQuery:

$.ajax({
url : url,
type : \'GET\',
dataType: \'json\',
data: {
    \'FN\'    : \'GetPages\',
    \'PIN\'   : \'7659\' 
},
xhrFields         


        
3条回答
  •  心在旅途
    2021-01-05 13:33

    Try this one

    $.ajax({ type : "GET", 
                 url : URL, 
                 data: {
                 'FN'    : 'GetPages',
                 'PIN'   : '7659' 
                 },
                xhrFields: {
                 withCredentials: true
                 },
                 crossDomain: true,
                 dataType : "jsonp", 
                 jsonp : "jsoncallback", 
                 jsonpCallback : "SMS", 
                 cache : true, 
                  success : function(service_data) { 
    
    
                          },
                  error : function(msg) {
                     alert(JSON.stringify(msg));
                    }
              });
    

提交回复
热议问题