How do I submit a form in jQuery async?

前端 未结 4 1702
醉话见心
醉话见心 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

    This should do it:

    $.ajax({   
       type: 'POST',   
       url: url,   
       data: $('#bob').serialize(),
       success: success,
       dataType: dataType 
    }); 
    

提交回复
热议问题