HTML form readonly SELECT tag/input

前端 未结 30 3032
陌清茗
陌清茗 2020-11-22 08:28

According to HTML specs, the select tag in HTML doesn\'t have a readonly attribute, only a disabled attribute. So if you want to keep

30条回答
  •  广开言路
    2020-11-22 09:16

    Rather than the select itself, you could disable all of the options except for the currently selected option. This gives the appearance of a working drop-down, but only the option you want passed in is a valid selection.

提交回复
热议问题