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

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.

更高级的选项是使文本字段具有自动完成功能。用户输入一两个字母,然后您可以选择搜索结果。它可以让您更轻松地找到您正在寻找的选项 - 如果您知道自己在寻找什么。缺点是用户无法看到所有选项。

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.

更高级的选项是构建“搜索,列表和选择”窗口小部件,默认显示X项目,但允许您搜索。这种方法的一个优点是我可以允许搜索多个属性,而不仅仅是要选择的项目的名称。

  1. What solutions have you deployed in these situations?
  2. 您在这些情况下部署了哪些解决方案?

  3. Is there a jQuery plugin I should know about?
  4. 有一个我应该知道的jQuery插件吗?

9 个解决方案

#1


4

  1. The solution that I like to use is provide the user a select list with all the options (should they want to look through it), but provide an autocomplete feature which searches through the list as they type into it. Sort of a hybrid of your first and second options.
  2. 我喜欢使用的解决方案是为用户提供包含所有选项的选择列表(如果他们想要查看它),但提供自动完成功能,在列表中搜索列表时搜索列表。排序第一和第二选项的混合。

  3. As for plug-ins, there are a number out there (as well as documentation which will lead you to more) that can help you here:
    • http://plugins.jquery.com/project/jquery-select-autocomplete
    • http://docs.jquery.com/Plugins/Autocomplete/autocomplete
    • http://jquery-ui.googlecode.com/svn/branches/labs/selectmenu/
  4. 至于插件,那里有一些(以及可以引导您更多的文档)可以帮助您:http://plugins.jquery.com/project/jquery-select-autocomplete http:/ /docs.jquery.com/Plugins/Autocomplete/autocomplete http://jquery-ui.googlecode.com/svn/branches/labs/selectmenu/

更多相关文章

  1. 从下拉列表中获取复选框的值
  2. 如何使用meta在“NEW”选项卡中重定向
  3. 9.1.4 前端 - HTML body标签 - 标题,段落,分割线,换行,特殊符号,列
  4. 用无序列表键入文本脚本
  5. .fadeToggle()使我的子列表不可访问
  6. 在新选项卡中打开下载的文件
  7. 如何将带有图形链接的列表转换为内联列表?
  8. 如何集中无序列表?
  9. 从PHP数组创建HTML列表

随机推荐

  1. Layout1.9
  2. Android usb 驱动
  3. Android 查看本机外网IP
  4. AndroidMenifest.xml(Android清单文件)内
  5. Android调用摄像头闪退
  6. Android官方资料--A/B System Updates
  7. c#开发android时layout.axml没有智能提示
  8. 解读ExpandableListView源码样式
  9. 初探 Ubuntu下android NDK
  10. 在 actionbar中使用 searchview