Home > Backend Development > PHP Tutorial > jquery批量上传是Post提交导致整个表单没法提交至后台?

jquery批量上传是Post提交导致整个表单没法提交至后台?

WBOY
Release: 2016-06-23 13:41:23
Original
1021 people have browsed it

我要添加商品,表单通过jquery无刷新(get)提交,在里面还有一个批量图片上传使是通过

来上传图片,在我点击添加按钮的时候整个表单一直提示正在提交....,我怀疑是图片上传的表单和提交表单冲突了,不上传图片就可以否则就没法和后台交互,不知道有什么办法吗?哪位大神帮帮忙


回复讨论(解决方案)

你最好把你 大form 和小form的代码结构发一下.
根据你说的,你点击添加按钮的时候,就触发了提交的动作?  这肯定有问题,   只不过是点击添加按钮,怎么会呢?

代码已经贴上去,麻烦大家帮忙看下吧,我是实在没什么好办法了,技术不到家只能求助各位了

  //获取上传图片   var imagesall = new Array();   $("img").each(function() {   if($(this).attr("class") == "preview") {   imagesall.push($(this).attr("value"));	  }    });   var imagesall = imagesall.join(',');	//获取数据库读取图片   var imagesall2 = new Array();   $("img").each(function() {   if($(this).attr("class") == "goods_img") {   imagesall2.push($(this).attr("src"));	  }    });   var imagesall2 = imagesall2.join(',');
Copy after login

照着改下

谢谢了,我试下了,成功了

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template