가 가이드로 이것을 사용하여 결과 : http://msdn.microsoft.com/en-us/library/dd250846.aspxJSONP 요청은
누군가가 JQuery와 통화를 도와 줄 수 있습니까?
사실 콜백의 자바 스크립트 코드 또는 함수의 이름 만 전달합니까?
BingSearch = function($bingUrl, $bingAppID, $keyword, $callBack) {
$bingUrl = $bingUrl + "?JsonType=callback&JsonCallback=" + $callBack + "&Appid=" + $bingAppID + "&query=" + encodeURI($keyword) + "&sources=web";
$.ajax({
dataType: 'jsonp',
jsonp: $callBack,
url: $bingUrl,
success: function(data) {
alert('success');
$callBack(data);
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
alert("error: " + textStatus);
}
});
};
확인 업데이트 나는이 변경 있도록 : 그것은 좋아 호출
BingSearch = function(bingUrl, bingAppID, keyword, callback) {
var url = bingUrl + "?method=?&JsonType=callback&Appid=" + bingAppID + "&query=" + encodeURI(keyword) + "&sources=web";
$.getJSON(url, callback);
};
: 아직도 '잘못된 라벨'오류가 발생
BingSearch(url, appid, searchkeyword, function(searchresults) {
alert('yes!');
};
.
+10000000000000000 감사합니다. – Blankman
내기를 걸었습니다. 재미있게 보내십시오. – dshaw