jquery中的标准请求,只有get和post,而put和delete其实都是post请求,只是分别加了参数_method: put和method: delete, 所以在jquery中ajax delete请求时就可以使用$.post(url, {_method: "delete"}, function(data){...})。这个要比直接使用$.ajax({method: :delete})好的多,有两个原因,1: 部分浏览器不支持{method: :delete}和{method: :post}2: 这个ajax请求无法处理返回的数据
jquery异步提交delete方法的请求
最新推荐文章于 2023-11-29 16:38:35 发布