简体   繁体   中英

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.

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文本不适用于下拉菜单。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM