Select Multiple Form Fields

asmSelect是一款jQuery插件,它通过渐进增强的方式改进了多选下拉框的用户体验。该插件隐藏了原始的多选框,并用常规下拉框替代显示可用选项,同时用HTML列表展示已选择的项。用户可以逐个添加或移除选项,操作直观且易于理解。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

ASMSELECT

asmSelect is a jQuery plugin that answers some of these issues. A progressive enhancement is applied to the select multiple that makes it much easier to use. This enhancement automatically hides the original select multiple, and instead presents a regular select showing the available options, and an HTML list showing the already-selected options. While hidden, the original select multiple is updated as the user makes changes. Here is an example of an asmSelect:

Example

 

Select some categoriesBest PracticesClient RelationshipsCommunicationsCompensationContracts and NegotiationsDesign and Construction MarketplaceDesign/Build Project DeliveryEducationFinancial Management and ProfitabilityGlobal MarketplaceHuman ResourcesIntelligent ChoicesLeadershipManagementMarketingMergers and AcquisitionsOperations ManagementPublic RelationsStaff Recruitment and RetentionStrategic PlanningStrategySustainabilityTechnologyTrends
  1. Staff Recruitment and Retentionremove
 Best Practices Client Relationships  Compensation Contracts and Negotiations Design and Construction Marketplace Design/Build Project Delivery Education Financial Management and Profitability    Leadership Management  Mergers and Acquisitions Operations Management Public Relations  Strategic Planning Strategy Sustainability   TechnologyTrendsMarketingGlobal MarketplaceCommunicationsHuman ResourcesIntelligent ChoicesStaff Recruitment and Retention

 

Advantages

No Ctrl/Cmd-Clicking is necessary to select multiple items, and an accidental click is not destructive. You add or remove items one at a time. Only the already-selected items occupy screen real estate, as they should. A remove link is included with each selected item, which eliminates ambiguity. Viewing and choosing a new item to add requires clicking on the select. This action is inherently more familiar, and displays many more available options at once, than a select multiple. More is seen at a glance and less scrolling (if any) is required to see all available options.

When an option has been selected, then it either no longer appears in the list of options, or it is disabled (grayed out and not selectable). If the user removes it from their selected items, then it naturally goes back into the list of available options.

Because this solution relies upon the familiar select pulldown, the enhancement is not likely to require additional user instruction. The cause-and-effect relationship between the select and its effect on the list is clear, as is the action for removing items from the list.

Optionally, this type of select is sortable, giving it hierarchy. The user can drag and drop the items to the desired order. Lets say that your article is related to 10 categories, which you have selected. But “Technology” and “Trends” are the most significant categories. You’d hardly be satisfied with those two categories living at the bottom of the list when your article is published on the site. Wouldn’t it be nice if you could not only select multiple categories, but also put them in the order you wanted? This solution will enable that.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值