如何以编程方式告诉HTML SELECT下拉(例如,由于鼠标悬停)? [英] How can you programmatically tell an HTML SELECT to drop down (for example, due to mouseover)?
问题描述
如何以编程方式告诉HTML 选择
下拉(例如,由于鼠标悬停)?
您无法使用HTML选择标记来做到这一点,但您可以使用JavaScript 和 HTML来完成此操作。有很多现有的控件可以实现这一点 - 例如,附加到SO有趣/忽略标签条目的建议列表,或者Gmail查找电子邮件地址。
<有许多提供此功能的JavaScript + HTML控件 - 查找想法的自动完成控件。
请参阅此链接以获取自动完成控件... http://ajaxcontroltoolkit.codeplex.com/
How can you programmatically tell an HTML select
to drop down (for example, due to mouseover)?
You can't do this with a HTML select tag, but you can do it with JavaScript and HTML. There are variety of existing controls that do this - for instance, the "suggest" list attached to the SO "interesting/ignored tag" entry, or Gmail's lookup for email adresses.
There are many JavaScript+HTML controls that provide this capability--look for autocomplete controls for ideas.
See this link for the Autocomplete control...http://ajaxcontroltoolkit.codeplex.com/
这篇关于如何以编程方式告诉HTML SELECT下拉(例如,由于鼠标悬停)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!