Jquery Laravel ajax响应在chrome中运行,但在firefox中不运行

Jquery Laravel ajax响应在chrome中运行,但在firefox中不运行,jquery,ajax,laravel,csrf,Jquery,Ajax,Laravel,Csrf,我正在使用链接删除记录 html 路线 回应 public function destroy($id) { return response()->json(['status'=>1]); } 现在,我在chrome上得到了响应,但在firefox上没有得到响应。在清除视图后,您是否在两种浏览器上都尝试过私有/匿名模式?什么是“不工作”?您的期望是什么?实际结果是什么?php没有delete方法,请使用POSTI am从控制器返回值来检查ajax是否正常工作。我在chrome

我正在使用链接删除记录

html

路线

回应

public function destroy($id)
{
    return response()->json(['status'=>1]);
}

现在,我在chrome上得到了响应,但在firefox上没有得到响应。

在清除视图后,您是否在两种浏览器上都尝试过私有/匿名模式?什么是“不工作”?您的期望是什么?实际结果是什么?php没有delete方法,请使用POSTI am从控制器返回值来检查ajax是否正常工作。我在chrome中得到响应,但firefox给出了状态错误。firefox没有提供错误代码。@告诉您控制台它说了什么?
$.ajaxSetup({
    headers: {
        'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
    }
});

function http_post(url, postData){
return $.ajax({
    url:url,
    data: postData,
    type: 'DELETE'
});
Route::resource('category', 'CategoriesController');
public function destroy($id)
{
    return response()->json(['status'=>1]);
}