How can I limit the number of shown options in an HTML <select>
drop down?
For example:
<select>
<option value="1">1</option>
<option value="2">2</option>
...
<option value="20">20</option>
</select>
How can I get the browser to show only the first five options and scroll down for the rest?
I used this code and it worked for me on Chrome, Firefox and IE.
Tnx @Raj_89 , Your trick was very good , can be better , only by use extra style , that make it on other dom objects , exactly like a common select option tag in html ...
u can see result here : http://jsfiddle.net/aTzc2/
( display just first option of all options)