使用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. SSIS之序列容器

    序列容器是一种十分简单,但使用非常广泛的容器,它可以对控制流的任务流组件进行结构化处理,把一些业务相关的任务组件,放到一个序列容器中,使整个包看起来更加整洁.美观,就如同我们家里的书柜.衣柜似的,把不 ...

  2. 安全清空废纸篓mac

    在.bash_profile中加入: alias secureempty='sudo srm -rfvsz /Volumes/*/.Trashes/* ~/.Trash/*' 然后做终端输入:secu ...

  3. linux 部署python2.7

    tar xvf Python-.tar.bz2 mkdir /usr/local/python27 ls cd Python- ./configure --prefix=/usr/local/pyth ...

  4. 条款42:了解typename的双重含义

    typename在很多种情况下与class是完全相同的,例如下面的使用: templame<typename T> ...... template<class T> ..... ...

  5. 轮廓Outline|表格Table实例

    1.使用outline属性在元素周围画一条线. border:red solid thin; outline:#00ff00 dotted thick; outline-style:dotted|da ...

  6. 不能解决,复选框在request对象获取的信息后显示在用户信息里面为中文的选项名

    因为方框里面value 不用中文?.? 假如用中文呢?  完全可以!!已经试验 如果不用中文,那么中文可以用对象的参数来获得,即在login.jsp中就要用javabean类属性

  7. SQL多表联查总结

    交叉连接:(不常用)返回两个表的笛卡尔乘积(也即全组合排列)中符合查询条件的数据行. 内连接返回连接表中符合连接条件和查询条件的数据行. 左外连接返回符合连接条件和查询条件(即:内连接)的数据行,且还 ...

  8. file_put_contents();

    file_put_contents(); 用于获取文件中的内容,可以填写网址,但是需要以http://开头

  9. PHP数据结构之实现栈

    接着前面PHP数据结构来学习,今天写的是实现栈. <?php class stack //定义一个栈的类 { private $size; //栈的空间大小 private $top; // 栈 ...

  10. Scala 面向接口编程

    1.如果要实现一个接口,前边没有extends关键字就可以使用extends,如果有要使用with关键字 2.Scala 中的接口支持多种继承,类或者抽象类不支持多种继承 3.抽象属性:未被实例化的属 ...