GUI替代& lt; select& gt;当你有很多选择 [英] GUI alternative to <select> when you have a lot of options

查看:50
本文介绍了GUI替代& lt; select& gt;当你有很多选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

< select> 可能适合在3-15个简单的项目之间进行选择,但是您如何处理15-100个以上的项目?

A <select> might be good for choosing between 3-15 simple items, but how do you deal with 15-100+?

最简单的选择是仅包含许多< option> 的普通< select> ,但这是不太人性化.滚动很多,可能很难找到想要的选项.好处是您可以(也许通过滚动)看到所有的选项.

The simplest option would be to just have a plain <select> with a lot of <option>s, but it's not very user friendly. There's a lot of scrolling and it might be hard to find the option you are looking for. The benefit is that you can (maybe with scrolling) see all the options you have.

一个更高级的选项是具有自动完成功能的文本字段.用户键入一个字母或两个字母,然后搜索结果就会从中选择.如果您知道要查找的内容,则可以更轻松地找到要查找的选项.缺点是用户看不到所有选项.

A more advanced option would be to have a text field with autocomplete. A user types in a letter or two, and search results come back which you choose from. It makes it easier to find the option you are looking for - if you know what you are looking for. The drawback is that the user can't see all the options.

一个更高级的选项是构建搜索,列出并选择"小部件,该小部件默认显示X个项目,但允许您搜索.这种方法的优点是,我可以搜索多个属性,而不仅仅是搜索要选择的项目的名称.

An even more advanced option would be to build a "search, list and choose" widget which defaults to show X items, but allows you to search. An advantage of this approach is that I can allow search on multiple attributes and not just the name of the item which is to be selected.

  1. 您在其中部署了哪些解决方案这些情况?
  2. 我应该知道一个jQuery插件吗?

推荐答案

  1. 我要使用的解决方案是为用户提供一个带有所有选项的选择列表(他们应该浏览一下),但是提供了自动完成功能,可以在他们键入列表时在列表中进行搜索.您的第一选择和第二选择混合在一起.
  2. 关于插件,这里有一些数字(以及可以帮助您获得更多信息的文档)可以在这里为您提供帮助:

这篇关于GUI替代&amp; lt; select&amp; gt;当你有很多选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆