jquery html5怎样把文件上传到文件夹
1个回答
2015-07-20 · 知道合伙人软件行家
关注
展开全部
楼主你好!根据你的描述,让我来给你回答!
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
});
希望能帮到你,如果满意,请记得采纳哦~~~
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
});
希望能帮到你,如果满意,请记得采纳哦~~~
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询