아래에서 볼 수 있듯이 URL에 대한 간단한 jquery ajax 호출을 수행하고 있습니다. 응답은 OK 200이고 responseText를 console.log하려고하는데 아무것도 얻지 못합니다. 내가 도대체 뭘 잘못하고있는 겁니까?
그리고 jQuery없이 순수 자바 스크립트에서 어떻게 이것을 할 수 있습니까?
$.ajax({
url:'https://poloniex.com/private.php?currencyPair=BTC_LTC&rate=0.016&amount=1&command=buy',
dataType:'json',
success: function(data, textStatus, xhr){
console.log('asdfasdfadsf');
console.log(data);
console.log('hello' + textStatus);
console.log(xhr.responseText);
}//success
}); //ajax
응답을 json 문자열로 구문 분석하고 ajax가 "오류"콜백으로 리디렉션하기 때문입니다. dataType
html로 변경 하거나 스크립트의 응답을 변경하십시오.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다