var url = "http://localhost:8080/newkdd/queryPage";
$.ajax({
type : 'post',
contentType:"application/json",
data:JSON.stringify({id:1}),
url : url,
success : function(data, status) {
console.log(data);
},
error : function(data, status, e) {
console.log("系统异常" + e);
}
});
修改为JSON格式,传入参数应为JSON字符串,重点如下:
contentType:"application/json",
data:JSON.stringify({id:1}),