gistfile1.txt ps�C V j�C V $.ajax({ type: "POST", url: "api.php", timeout: 10000, cache: false, data: {'hello': "world"}, dataType: 'json' }) .done(function (response, textStatus, jqXHR) { console.log(response); if (response.status === "err") { alert("err: " + response.msg); } else { alert("OK"); } }) .fail(function (jqXHR, textStatus, errorThrown) { console.log(jqXHR); alert("失敗: サーバー内でエラーがあったか、
![jQuery 3における ajax の書き方一例](https://cdn-ak-scissors.b.st-hatena.com/image/square/1ef26f6cb4349557952890dbe3e567f7f98dc151/height=288;version=1;width=512/https%3A%2F%2Fgithub.githubassets.com%2Fassets%2Fgist-og-image-54fd7dc0713e.png)