https://www.jianshu.com/p/775cce61bfe5
JQuery ajax提交form表单实现文件上传
2017.08.04 15:15* 字数 0 阅读 4172评论 0喜欢 1
function test() {
var form = new FormData(document.getElementById("tf"));
$.ajax({
url: "http://192.168.10.133:8080/ktl/resource/getSourceData",
type: "post",
data: form,
processData: false,
contentType: false,
success: function(data) {
console.log(data);
},
error: function(e) {
console.log(e);
}
});
}
标签:JQuery,function,false,form,ajax,data
来源: https://blog.youkuaiyun.com/weixin_42635759/article/details/100578333