Why can't radio buttons be “readonly”?

前端 未结 13 1222
误落风尘
误落风尘 2020-11-27 10:45

I would like to show a radio button, have its value submitted, but depending on the circumstances, have it not editable. Disabled doesn\'t work, because it doesn\'t submit t

13条回答
  •  春和景丽
    2020-11-27 11:00

    For the non-selected radio buttons, flag them as disabled. This prevents them from responding to user input and clearing out the checked radio button. For example:

    
    
    

提交回复
热议问题