How do I submit a form in jQuery async?

前端 未结 4 1694
醉话见心
醉话见心 2020-12-17 16:35

In mootools I would do something like $(\'form_id\').send({success:function(res){....}}); What is the parallel syntax in jQuery?

Another words:
How

4条回答
  •  不思量自难忘°
    2020-12-17 16:56

    There is nothing that ships with jQuery that will automatically AJAXify a normal form for you.

    Option 1 -- Intercept the form's submit event, scrape the data from form fields using serialize, and send using ajax or post, as suggested.

    Option 2 -- Use this great forms plugin, which does all of option 1 for you.

提交回复
热议问题