laravel下如何使用ajax
1 回答

慕村225694
TA貢獻1880條經驗 獲得超4個贊
參考:
$.ajax({
type: 'POST',
url: '/ajax/create',
data: { date : '2015-03-12'},
dataType: 'json',
headers: {
'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content')
},
success: function(data){
console.log(data.status);
},
error: function(xhr, type){
alert('Ajax error!')
}
});
- 1 回答
- 0 關注
- 635 瀏覽
添加回答
舉報
0/150
提交
取消