disable first option in select

Solutions on MaxInterview for disable first option in select by the best coders in the world

showing results for - "disable first option in select"
Máximo
23 Jul 2019
1<select>
2   <option hidden>Choose</option>
3   <option>Item 1</option>
4   <option>Item 2</option>
5</select>
Evan
16 Jan 2020
1<!-- disable form first dropdown option -->
2<script type="text/javascript">
3  $( "form option:first-child" ).attr("disabled","disabled");
4</script>
5