大佬教程收集整理的这篇文章主要介绍了使用一个提交按钮jQuery提交两个表单,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我有两种形式
表格1基本设置:
<form action="/post" class="frm-form" method="post" name="post" onsubmit="return vB_Editior['text_editor'].prepare_submit(0,0)" id="quick_reply"> <textarea></textarea> <input type="submit" name="post" value="Send"> </form>
表2基本设置:
<form enctype="multipart/form-data" id="tagnotif" style="display:none;" onsubmit="return vB_Editor['text_editor'].prepare_submit(0,0)" name="post2" method="post" action="/privmsg"> <input id="username" class="post" type="text" tabindex="1" size="25" name="username[]"style="margin:1px 0"><br /> <input id="acpro_inp10" class="post" type="text" onkeypress="if (event.keyCode==13){return false}" title="" tabindex="2" maxlength="64" size="45" value="You have been tagged" name="subject"><br /> <textarea id="textingnotification" rows="15" cols="9" name="message" tabindex="3"></textarea> <input type="hidden" value="" name="lt"> <input type="hidden" value="inBox" name="folder"> <input type="hidden" value="post" name="mode"> </form>
我只需要在SEND印刷机上提交这两个表格
尝试使用主要脚本使用此代码变量:虽然它不会同时通过,但它不会刷新页面…
$(document).ready(function() { $('#quick_reply').ajaxForm(function() { alert("Thank you for your submitting form 1"); }); $('#tagnotif').ajaxForm(function() { alert("Thank you for your submitting form 2"); }); }); function mySubmitFunction() { $("#quick_reply").submit(); $("#tagnotif").submit(); }
以上是大佬教程为你收集整理的使用一个提交按钮jQuery提交两个表单全部内容,希望文章能够帮你解决使用一个提交按钮jQuery提交两个表单所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。