laravel下如何使用ajax
1 回答

慕村225694
TA貢獻(xiàn)1880條經(jīng)驗(yàn) 獲得超4個(gè)贊
參考:
$.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 關(guān)注
- 633 瀏覽
添加回答
舉報(bào)
0/150
提交
取消