<script> var formData = new FormData(); const date = $("#datepicker2").val(); formData.append("date", date); formData.append("file", $("#upload")[0].files[0]); $.ajax({ url: url, type: "post", cache: false, data: formData, processData: false, contentType: false, success: function (msg) {}, beforeSend: function () {}, error: function () {}, }); </script>
标签:jQuery,function,false,formData,ajax,date,上传 From: https://www.cnblogs.com/caroline2016/p/16905549.html