Form submission using jQuery ajax

后端 未结 4 2044
太阳男子
太阳男子 2021-01-23 19:59

Form is not submit using ajax.form submit on click li. Give me some solution

My js code is here

$(document).ready(function(){

$(\'#sortable li\').click(         


        
4条回答
  •  半阙折子戏
    2021-01-23 20:44

    You can use the ajaxForm/ajaxSubmit functions from Ajax Form Plugin or the jQuery serialize function.

    Example:

    $("#frmgallery").ajaxForm({url: 'gallery.php', type: 'post'})
    

    or

    $("#frmgallery").ajaxSubmit({url: 'gallery.php', type: 'post'})
    

    ajaxForm will send when the submit button is pressed. ajaxSubmit sends immediately.

提交回复
热议问题