prevent bootstrap modal window from closing on form submission

后端 未结 7 1824
轻奢々
轻奢々 2021-02-05 06:47

Hi I\'m using Bootstrap for the first time and I can\'t get my modal form to stay open on clicking the submit button. I\'ve searched SO but all related questions deal with slig

7条回答
  •  既然无缘
    2021-02-05 07:08

    Use this to prevent bootstrap modal window from closing on form submission

    $( "form" ).submit(function( event ) {
      event.preventDefault();
    });
    

提交回复
热议问题