Bootstrap select dropdown list placeholder

前端 未结 19 1253
谎友^
谎友^ 2021-01-29 22:39

I am trying to make a dropdown list that contains a placeholder. It doesn\'t seem to support placeholder=\"stuff\" as other forms do. Is there a different way to ob

19条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-29 23:10

    I think, the Dropdown box with a class and JQuery code to disable the first option for user to select, will work perfectly as Select Box placeholder.

    
    

    Make the first option disabled by JQuery.

    
    

    This will make the first option of Dropdown as Placeholder and user will no longer able to select the first option.

    Hope It helps!!

提交回复
热议问题