windows - How can i make a drop down box show different characters -


how can make drop down box show list of options show 1 character when closed

for example

the drop down box show

a horse b cat c dog d fish

and when drop down box closed show first character.

any appreciative.

you try this:

<select     style="width:40px;"     onblur="this.style.width='40px';"     onfocus="this.style.width='auto';"     onchange="this.style.width='40px';" >     <option>a cat</option>     <option>b dog</option>     <option>c horse</option>     <option>d hippopotamus</option> </select> 

http://jsfiddle.net/vgfgw/


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -