jquery 多个form表单同时提交
浏览量:2107
我有N个表单,如下:
<form action="" class="test"><input type="text"></form>
<form action="" class="test"><input type="text"></form>
<form action="" class="test"><input type="text"></form>
<form action="" class="test"><input type="text"></form>
<form action="" class="test"><input type="text"></form>
<form action="" class="test"><input type="text"></form>
<form action="" class="test"><input type="text"></form>
现在需要一下子提交,他们的action还有可能不一样。可以用下面的做法:
我用了jquery的form插件 jquery-form.js
var length = $(".form").length;
for(i=0;i<length;i++){
$(".test").eq(i).ajaxSubmit();
}
如图所示:
本帖子价值5毛,请自行捐献给阿里公益:https://love.alipay.com/donate/itemDetail.htm?name=2014111411123258728
神回复
发表评论:
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。