jquery:上传文件
$.ajax({ url : form.attr('action'), type : 'POST', cache : false, data : new FormData($('#form')[0]), processData : false, contentType : false, success : function(result) { // do something } });
<form id="form" autocomplete="off" class="form-horizontal" role="form" th:action="@{/app/wuliu/yundan/save/}" enctype="multipart/form-data">
本文来自博客园,作者:huiy_小溪,转载请注明原文链接:https://www.cnblogs.com/huiy/p/12833307.html