Change form values after submit button pressed

前端 未结 3 946
长发绾君心
长发绾君心 2020-11-27 07:21

[EDIT] After a lot of digging around, I found out that the problem was in how I integrated the CKEditor into my page. The simple and obvious way does work in this c

3条回答
  •  醉酒成梦
    2020-11-27 07:24

    You need to prevent the default submit action and then resubmit the form yourself manually:

    $('form').submit(function(e) {
        e.preventDefault();
    
        // do your processing
    
        this.submit(); // call the submit function on the element rather than 
                       // the jQuery selection to avoid an infinite loop
    });
    

提交回复
热议问题