后台数据全部显示到前端
$.ajax({
type:‘post’,
url:’’,
contentType:‘application/json’,
beforeSend:function(){
alert(‘请求即将发送’);
},
success:function(response){
if(response){
$("#add").html(JSON.stringify(response.data));
}else{
$("#add").html(“出现错误”);
}
return false;
},
error:function(xhr){
alert(“失败”);
return false;
},
});