使用ajax提交form表单时,$("formId").serialize()不能提交type="file"类型的input,这个时候可以选择使用FormData,使用方法如下

var dataForm = new FormData(document.getElementById("queryForm"));
$.ajax({ processData: false,//这个必须有,不然会报错
contentType: false,//这个必须有,不然会报错
type: "POST",
url:"/trail/shopdeepupload",
data:dataForm,
async: false,
dataType:"json" ,
success: function(data) { if(data=="false"){
showTipPanel("上传失败,请重试!");
}
if(data=="true"){
showTipPanel("上传成功!");
setInterval(retFun(),1000);
}
}
});

 

TypeError: 'append' called on an object that does not implement interface FormData 解决方法的更多相关文章

  1. ajax上传图片报错TypeError: 'append' called on an object that does not implement interface Fo

    使用FormData时报错:TypeError: 'append' called on an object that does not implement interface FormData 解决办 ...

  2. TypeError: 'stepUp' called on an object that does not implement interface HTMLInputElement.

    我今天写程序的时候遇到的问题,开始完成功能后没发觉.当再次部署程序更新时候,出的错误,通过firebug发现提示是TypeError: 'stepUp' called on an object tha ...

  3. python 报错TypeError: 'range' object does not support item assignment,解决方法

    贴问题 nums = range(5)#range is a built-in function that creates a list of integers print(nums)#prints ...

  4. Warning: count(): Parameter must be an array or an object that implements Countable in line 302解决方法

    ytkah在调试项目时又弹出一个警告Warning: count(): Parameter must be an array or an object that implements Countabl ...

  5. error while loading shared libraries: libg2o_core.so: cannot open shared object file: No such file or directory解决方法

    在build文件夹目录环境下输入: sudo ldconfig 然后编译就可以了.因为g2o刚装,没生效.

  6. cannot open shared object file: No such file or directory解决方法

  7. 【Selenium】【BugList8】126邮箱定位不到“退出”按钮:Message: TypeError: can't access dead object

    [流程描述] 登录126邮箱,退出 [代码] #coding=utf-8 from selenium import webdriver driver = webdriver.Firefox() #dr ...

  8. Vue报错:Uncaught TypeError: Cannot assign to read only property’exports‘ of object’#<Object>‘的解决方法

    发现问题 运行一下以前的一个Vue+webpack的 vue仿新闻网站  小项目,报错 由于自己vue学习不深入,老是这个报错,找了好久(确切的说是整整一下午^...^)才找到原因 -v- Uncau ...

  9. for遍历用例数据时,报错:TypeError: list indices must be integers, not dict,'int' object is not iterable解决方法

    一:报错:TypeError: list indices must be integers, not dict for i in range(0,len(test_data)): suite.addT ...

随机推荐

  1. JMeter接口测试报错,反馈和postman不一样(二)

    我总共现在有两个可以学习的接口,昨天测试一个接口发现问题解决后,今天测试另外一个发现又有问题了 这一次还是反馈显示不一样 要么 这种情况是直接从postman里面拿过来的数据,没做处理  报not j ...

  2. 03_01_基本操作_增(insert)

    1. 1.1.创建表 create table employee( id number primary key, name varchar2(64) not null, email varchar2( ...

  3. 免费获得 NTFS for Mac 12. Special Edition 激活码活动

    进入页面:http://www.paragon-drivers.com/cn/ntfs-mac-free/ntfs-free.html 先点击“下载”按钮,下载 NTFS for Mac 12. Sp ...

  4. hdu 3401 单调队列优化+dp

    http://acm.hdu.edu.cn/showproblem.php?pid=3401 Trade Time Limit: 2000/1000 MS (Java/Others)    Memor ...

  5. SecureCrt 连接Redhat linux

    1.Vmware虚机设置网络模式为桥接Bridge.保证linux中能ping通windows,windows中也能ping通linux. 2.修改sshd_config文件,命令为:vi /etc/ ...

  6. RabbitMQ学习系列三:.net 环境下 C#代码订阅 RabbitMQ 消息并处理

    上一篇已经讲了Rabbitmq如何在Windows平台安装 不懂请移步: RabbitMQ学习系列二:.net 环境下 C#代码使用 RabbitMQ 消息队列 一.理论 .net环境下,C#代码订阅 ...

  7. LeetCode OJ:Construct Binary Tree from Preorder and Inorder Traversal(从前序以及中序遍历结果中构造二叉树)

    Given preorder and inorder traversal of a tree, construct the binary tree. Note:You may assume that ...

  8. ps6-图层基础与操作技巧

    1.图层的新建.复制与删除 ctrl+j:复制图层,可以用复制选区作为新图层 Shift+Ctrl+Alt+e:在新的空白图层将下面所有的图层合并为一个图层. 2.选择复制与链接图层 在移动图层时,按 ...

  9. hdu-2544-最短路(dijkstra算法模板)

    题目链接 题意很清晰,入门级题目,适合各种模板,可用dijkstra, floyd, Bellman-ford, spfa Dijkstra链接 Floyd链接 Bellman-Ford链接 SPFA ...

  10. New Concept English three (57)

    28w/m 54errors I stopped to let the car cool off and to study the map. I had expected to be near my ...