javascript - scrollbar for the dropdown list -


i want show scroll bar drop down list user can select one item available list. drop down menu should show 5 items , scroll bar drag , see remaining items in list when user clicks on drop down list. show drop down list using struts html tag library. below struts html code show drop down list.

 <html:select name="myform" property="city" styleid="city" tabindex="1" title="please select city">   <html:options property="city" labelproperty="city"/>  </html:select> 

do need write javascript function achieve scroll bar <html:options>. cannot use jquery application not support jquery libraries. please suggest how can achieve using javascript function.

simply assign class option list , add overflow equal auto. added style.

<html:select name="myform" property="city" styleid="city" tabindex="1" title="please select city"> 


Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -