submit form when elements change

后端 未结 4 1998
渐次进展
渐次进展 2021-01-12 03:57

In jQuery, if I assign class=auto_submit_form to a form, it will be submitted whenever any element is changed, with the following code:

/* autom         


        
4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-12 04:44

    I would give an id to the form:

    $(".auto-submit-item").change(function() {
        $("form#auto-submit").submit();
    });
    

提交回复
热议问题