简体   繁体   中英

How to hold a HTML select expanded while adding options

I am trying to add options to a select in its onclick event and works fine in Firefox and IE but... IE close the list after filling it although Mozilla holds the list expanded

¿Are there any way to hold expanded the list (or reexpand the list with JavaScript) in IE? (I am using IE 7.0)

Thanks!

No, not far as I know. The IE redraws the part that is changed, and therefore reset the "design" surface. That's why this happens. What you can do, add the options on the onMouseOver event. That should occur before the onClick .

A good reference on all events for the IE is in the library. http://msdn.microsoft.com/en-us/library/ms535893%28VS.85%29.aspx#

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM