조금 어리석은 느낌이 듭니다. 내 아약스 호출이 오류를 실행 중입니다 : 매번 함수. 나는 데이터가 JSON으로 되돌아오고 있음을 알고 있지만, jsonp와 같은 데이터 유형을 사용하여 교차하는 원점을 허용했다. 나는 명백한 것을 잊지 않는 한 내가 다르게 할 수 있다고 생각하지 않는다. 가세요 - 무슨 잘못이와 : 결과는 이미 자바 스크립트와 콜백 함수이 라이브러리에게 jsonp
로 https://github.com/padolsey/jQuery-Plugins/blob/master/cross-domain-ajax/jquery.xdomainajax.jsjQuery AJAX 호출에서 데이터를 반환하지 않습니다.
을 시도하십시오 :
function sartleApi(type,endpoint,object,callback){
$.ajax({
contentType: "application/json",
dataType: 'jsonp',
type:type,
data:object,
url:"http://dev.sartle.com/includes/ajax_reviewcomment.php?rid=1178",
success:function(data){
callback(data);
},
error: function (xhr, textStatus, errorThrown) {
alert(xhr.statusText);
alert(xhr.responseText);
alert(xhr.status);
alert(errorThrown);
}
});
}
stlll
상태는 무엇입니까? – soulcheck
해당 웹 사이트는 JSONP를 지원하지 않습니다. – Blender
수정 된 코드는 다음과 같이 표시됩니다. 성공, 정의되지 않음, 200, 오류 : jQuery183039935008878819644_1374881928941이 호출되지 않았습니다. –