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

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

jQuery:

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


        
3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-05 13:24

    I cant figured out from the image, but if you are trying send AJAX request to different domain, you need to use JSONP, simple AJAX request will not be sufficient

    Try to change dataType: 'json' to dataType: 'jsonp'

    and add callback=? to your URL

提交回复
热议问题