简体   繁体   English

jQuery自动完成功能不显示下拉列表,而是显示多少可用选项

[英]jquery autocomplete not showing drop down list, rather how many options available

I have a simple autocomplete 我有一个简单的自动完成功能

<input id="stafflist" type="text" placeholder="Start Typing Staff Name"  class="form-control" >

and the following script to set it up 和以下脚本进行设置

$( "#stafflist" ).autocomplete({
    source: [ "Name PersonA", "Name PersonB", "Name PersonC", "Name PersonD", "Name PersonE", "Name PersonF" ]
});

When I start typing, it tells me how many options are available: 当我开始打字时,它会告诉我有多少个可用选项:

1 result is available, use up and down arrow keys to navigate. 有1个结果可用,使用上下箭头键进行导航。

But the last time I used this, I was sure the drop down box was the default method of selecting values from the list... how do I bring back the dropdown??? 但是上次使用此功能时,我确定下拉框是从列表中选择值的默认方法...我该如何带回下拉框???

Thanks! 谢谢!

从输入字段中删除type =“ text”。Type文本不适用于下拉菜单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 建议的下拉列表中未显示 2 个或多个空格的 Jquery 自动完成 - Jquery autocomplete not showing 2 or multiple spaces in drop down suggested jQuery自动完成:选中了几个元素,如何不在下拉菜单中不显示选中的元素? - jquery autocomplete: several elements selected, how to not showing the selected elements in the drop-down menu? 使用JQuery Autocomplete使用数组和下拉列表 - Using JQuery Autocomplete using array and drop down list jQuery自动完成结果到自定义下拉列表(在select选项标签处) - jQuery autocomplete results to a custom drop down list (at select option tags ) 使用jQuery向下拉列表添加选项时出现问题 - Problem adding options to a drop down list using jQuery jQuery Autocomplete-如何为TextArea下拉菜单设置CSS样式? - jQuery Autocomplete - How to CSS style the TextArea drop-down menu? jQuery下拉列表 - jQuery drop down list 如何在jQuery中将这种单一情况(显示基于下拉列表的选择显示文本字段)抽象为通用函数? - How to abstract this single case (showing text field based on selection of a drop down list) into a general function in jQuery? 如何使用另一个下拉列表 asp.net core 3.0 过滤下拉列表的选项 - How to filter the options of a drop down list using another drop down list asp.net core 3.0 如何在jQuery中验证多个下拉列表 - How to validate multiple drop down list in jquery
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM