Select disable doesn't pass the value correctly

后端 未结 2 870
执念已碎
执念已碎 2021-01-28 23:45

Please help me. I use Codeigniter.

In VIEW i have

\'
                        
    
提交评论

  • 2021-01-29 00:27

    Would like to point out that the answer above is the best solution so far.

    $('select option:not(:selected)').each(function(){ $(this).attr('disabled', 'disabled'); }); 
    

    For the reason that, even when it's still disabled, the value still pass to the database without an error.

    0 讨论(0)
  • 提交回复
    热议问题