JQuery tips for submitting multiple forms

  • 2020-03-30 03:35:17
  • OfStack

<script type="text/javascript"> 
   $(function(){ 
         $("#btnSubmit").click(function(){ 
              $("form[name='form1']").submit(); 
              $("form[name='form2']").submit(); 
         }) 
    }) 
</script> 
<form name = "form1" action = "handleForm1Action"> 
</form> 
<form name = "form2" action = "handleForm2Action"> 
</form> 
<button id="btnSubmit"> submit <button>

Related articles: