submit disabled fields

后端 未结 8 1580
无人及你
无人及你 2020-12-03 04:34

I know the defined behavior for web forms is to not submit disabled fields... but that\'s not the definition I want. I want to use ajax to post the form and I want it to ge

8条回答
  •  醉梦人生
    2020-12-03 04:58

    Enable all the disabled input fields right before the submission using Jquery

       $('form').submit(function(e) {
        $(':disabled').each(function(e) {
            $(this).removeAttr('disabled');
        })
    });
    

提交回复
热议问题