select box – things you can do with selectbox

At one point, I wanted to modify things on selectbox, like make some of it’s options inactive, modifying the different styles on the select options and so on. Luckily I found this site http://www.cult-f.net/2007/12/14/elselect/ on how to do it.





For instance I got a select box with options Yes, No, Maybe and wanted to disable Yes. You can do it like this





<select name=”sel”>
<option value=’yes’ disabled>Yes</option>
<option value=’no’ class=”cls1″>No</option>
<option value=’maybe’  class=”cls2″>maybe</option>
</select>

This entry was posted in html and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>