相信大家使用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)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)