Form submit with AJAX passing form data to PHP without page refresh

后端 未结 10 1457
盖世英雄少女心
盖世英雄少女心 2020-11-22 06:07

Can anyone tell me why this bit of code isn\'t working?


  
    

        
10条回答
  •  孤独总比滥情好
    2020-11-22 06:38

    Here is a nice plugin for jQuery that submits forms via ajax:

    http://malsup.com/jquery/form/

    its as simple as:

     
     
    

    It uses the forms action for the post location. Not that you can't achieve this with your own code but this plugin has worked very nicely for me!

提交回复
热议问题