How to stop form submit during ajax call

前端 未结 7 1259
耶瑟儿~
耶瑟儿~ 2020-11-30 15:09

I can only modify the code in the ajax call. The ajax call occurs when I click the submit in form named $(\'#form1\').

$(\'#form1\').submit(func         


        
相关标签:
7条回答
  • 2020-11-30 15:32

    You can also use preventDefault()

    http://api.jquery.com/event.preventDefault/

    0 讨论(0)
提交回复
热议问题