Disable select option in IOS Safari

后端 未结 5 2039
别那么骄傲
别那么骄傲 2020-12-01 13:17

I\'ve implemented a form which needs to disable certain options in a select box using Javascript. It works fine in all browsers but not in Safari on IOS (Desktop Safari does

5条回答
  •  臣服心动
    2020-12-01 13:34

    If you change your disabled option to disabled blank optgroup, it seems to give the desired result without any additional javascript needed.

    
    

    As opposed to the usual

    
    

提交回复
热议问题