var fileObj = document.getElementById("upload-file2").files; // 获取文件对象
var form = new FormData();
for(var i=0;i<fileObj.length;i++){
form.append("file", fileObj[i]);// 文件对象
}
标签:文件,form,对象,FormData,js,fileObj,var,上传
来源: https://blog.csdn.net/qq_36073929/article/details/91465358