jquery请求数据

$(document).ready(function() {
$.ajax({
url: "http://123.207.88.84:8080/zdm/AppApi/Search/CategoryList",
data: sendData,
type: "POST",
dataType: "json",
}).done(function(json) {
_this.message = json;
console.log(json);
}).fail(function(xhr, status, errorThrown) {
alert("Sorry, there was a problem!");
console.log("Error: " + errorThrown);
console.log("Status: " + status);
console.dir(xhr);
}).always(function(xhr, status) {
console.log("The request is complete!");
});
// Your code here.
}); //ready

 

posted @ 2017-10-28 22:49  次序  阅读(344)  评论(0编辑  收藏  举报