解决Ajax发送DELETE请求时无法传参数的问题
2016-03-11 17:37
323 查看
相信大家使用spring 时一般都会用ajax发送delete请求,但是delete请求无法传参数怎么办呢?请看下面链接
http://stackoverflow.com/questions/10766195/spring-3-jquery-ajax-delete
防止那天无法访问了,下面就是该页面的解决方法。
$.ajax({
url: 'additions/cancelUpload',
type: 'POST',
data: {filename : ui.draggable.get(0).file.name, _method: 'DELETE'},
success: function (res) {
alert(res);
}
});
@RequestMapping(value = "cancelUpload", produces="text/html" method = RequestMethod.DELETE)
http://stackoverflow.com/questions/10766195/spring-3-jquery-ajax-delete
防止那天无法访问了,下面就是该页面的解决方法。
$.ajax({
url: 'additions/cancelUpload',
type: 'POST',
data: {filename : ui.draggable.get(0).file.name, _method: 'DELETE'},
success: function (res) {
alert(res);
}
});
@RequestMapping(value = "cancelUpload", produces="text/html" method = RequestMethod.DELETE)
相关文章推荐
- CentOS7安装配置redis
- dmesg
- 56. Merge Intervals 57. Insert Interval *HARD*
- PHP学习笔记(1)
- ucenter 简单分析与同步机制
- PHP学习笔记(1)
- POJ-2060-Taxi Cab Scheme-最小路径覆盖
- java poi excel node
- Android数据库Sqlite完全解析
- String str = new String("xyz") 会创建几个对象
- 应用程序调用tslib出现segmentation fault
- 1465 不容易系列之一
- ABAP ALV单个单元格状态编辑-简单版本
- sort中的比较函数compare
- 使用coding.net上传项目
- 初学Android Wi-Fi Peer-to-Peer
- 自定义下拉刷新控件-CBStoreHouseRefreshControl
- JSP总结-会话跟踪全解
- PAT (Advanced Level) Practise 1046 Shortest Distance (20)
- android 布局文件里输入框的值自动转换到类里边,可以增加为空验证