formData上传form数据

 var formData = new FormData(document.getElementById("addform"));
                $.ajax({
                    url: "url",
                    type: "post",
                    data: formData,
                    processData: false,
                    contentType: false,
                    success: function (data) {
                     
                    },
                    error: function (e) {
                     
                    }
                });

 

posted @ 2020-08-25 09:29  _York  阅读(155)  评论(0编辑  收藏  举报