| Welcome to WebmasterWorld Guest from 184.108.40.206 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Become a Pro Member|
|HTML select box default value|
Can it be set to a specific option?
| 5:02 pm on Nov 6, 2003 (gmt 0)|
Does anyone have any idea whether it's possible to set a default option for an html drop-down select box?
I have an ordered set of options, but would like to highlight an option as a default without necessarily having it first in the list. I had a faint recollection of it being as simple as
<option value="x" default>x</option>
but it doesn't seem to work (at least not for Mozilla anyway), so I must be wrong on that.
For a bonus point, is there a way to do it for 'select multiple' form elements?
Thanks in advance!
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved