「外部サーバー呼び出し(makeRequest)」の編集履歴(バックアップ)一覧はこちら
追加された行は緑色になります。
削除された行は赤色になります。
*使用できるデータタイプ
dataType を使って指定
text, html, xml, json, jsonp, script, feed, data のいずれかを指定。
*JQury.ajax を使う場合
$.ajax({
type: 'post',
url: 'http://example.com/data.json',
data: { comment: 'Say Hello!' },
dataType: 'json',
success: function(data, status) {
console.log(data, status);
},
error: function(xhr, status, e) {
console.info(xhr, status, e);
}
});
*jQuery.post を使う場合
$.post('http://example.com/data.json', { comment: 'Say Hello!' },
function(data, status) {}, 'json');
*使用できるデータタイプ
dataType を使って指定
text, html, xml, json, jsonp, script, feed, data のいずれかを指定。
*JQury.ajax を使う場合
$.ajax({
type: 'post',
url: 'http://example.com/data.json',
data: { comment: 'Say Hello!' },
dataType: 'json',
success: function(data, status) {
console.log(data, status);
},
error: function(xhr, status, e) {
console.info(xhr, status, e);
}
});
*jQuery.post を使う場合
$.post('http://example.com/data.json', { comment: 'Say Hello!' },
function(data, status) {}, 'json');