Search
 
SCRIPT & CODE EXAMPLE
 

HTML

html disable first option

<select name="name">
  <option disabled="disabled" selected="selected">Select an option.</option>
  <option>A</option>
  <option>B</option>
  <option>C</option>
</select>
Comment

disable first option in select

<select>
   <option hidden>Choose</option>
   <option>Item 1</option>
   <option>Item 2</option>
</select>
Comment

Disable form first dropdown option

<!-- disable form first dropdown option -->
<script type="text/javascript">
  $( "form option:first-child" ).attr("disabled","disabled");
</script>
Comment

PREVIOUS NEXT
Code Example
Html :: html multi checkbox list 
Html :: html scrollable table vertical 
Html :: html mobile app template 
Html :: capture webcam js 
Html :: vs code view release notes 
Html :: css svg width font size 
Html :: checkbox group 
Html :: faire un footer avec bootstrap 
Html :: bootstrap alert 
Html :: agregar atributo jquery 
Html :: html script element 
Html :: how to innerhtml is empty 
Html :: html paragraph 
Html :: html comment tag 
Html :: bootstrap hide row 
Html :: when does useeffect return run 
Html :: how to insert a banner in html 
Html :: hide navbar bootstrap 5 
Html :: html vs htm 
Html :: prevent modal from auto closing when clicked away 
Html :: html image size 50 percent 
Html :: using svg icons in html 
Html :: how to call a script from another script in javascript 
Html :: stimulus value 
Html :: how to add video in html 
Html :: input audio and video in html 
Html :: meta tag checker 
Html :: onchange html 
Html :: hmtl image import 
Html :: pt serif 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =