How to disable an option in dropdown list?

Rajnilari2015
Posted by Rajnilari2015 under HTML 5 category on | Points: 40 | Views : 647
The below code will do that

<select id="drp1" name="drpName">
<option value="Select">Select</option>
<option value="disabled" disabled="disabled" >Option 1</option>
<option value="2">Option 2</option>
</select>


The disabled="disabled" does the trick.

Comments or Responses

Login to post response