ajax提交form(文本数据以及文件上传)
$.ajax({ url: 'xxxx.do', type: 'POST', cache: false, data: new FormData($('.layui-form')[0]), processData: false, contentType: false }).done(function(request) { }).fail(function(res) { });
$.ajax({ url: 'xxxx.do', type: 'POST', cache: false, data: new FormData($('.layui-form')[0]), processData: false, contentType: false }).done(function(request) { }).fail(function(res) { });