「jQuery入門」ajax()処理サンプルコード

2017年10月28日

JSコード
$(“button").click(function(){
$.ajax({
type: “POST",
url: “xxx",
data: {
“userId": “test003",
“address": “shibuya"
},
dataType: “text"
}).done(function(msg){
alert('送信成功。’ + msg);
}).fail(function(data){
alert('送信失敗。’);
});
});

JavaScript

Posted by arkgame