jquery html5怎样把文件上传到文件夹
发布网友
发布时间:2022-05-07 23:28
我来回答
共1个回答
热心网友
时间:2022-04-20 00:18
楼主你好!根据你的描述,让我来给你回答!
var fd = new FormData(document.getElementById("fileinfo"));
fd.append("CustomField", "This is some extra data");
$.ajax({
url: "stash.php",
type: "POST",
data: fd,
processData: false, // tell jQuery not to process the data
contentType: false // tell jQuery not to set contentType
});
希望能帮到你,如果满意,请记得采纳哦~~~