HTML form readonly SELECT tag/input

前端 未结 30 2943
陌清茗
陌清茗 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:12

    A bit late to the party. But this seems to work flawlessly for me

    select[readonly] {
        pointer-events:none;
    }
    

提交回复
热议问题