今天公司实习生问我jQuery的ajax怎么写,这玩意不是很简单吗
1 2 3 4 5 6 7 8 9 10 11 12 13
| $.ajax({ url: "/cowBeer", method: "post", contentType: "application/json", data: JSON.stringify({ "name":"cowBeer" }), success: function (res) { console.log(res); }, error: function (res) { }
|