Make some options in a select menu “unselectable”

后端 未结 5 1927
广开言路
广开言路 2020-12-12 21:52

I have a select element with a few options, but I want some of the options to not be selectable.

Basically it\'s like this:



        
5条回答
  •  情深已故
    2020-12-12 22:24

    I can see from your question the previous answers to mine are in fact what uyou are looking for, however just to note for future people coming to this StackOverflow question alike myself looking for a similar answer they can simple type 'Disabled' in an option.

    
    

    JSFiddle Demo

提交回复
热议问题