I want users to be able to type text into the text box I set up. If they do not know their options, I want them to be able to click expand and select from a drop-down menu, such as on this page.
How can I get this?
<datalist>
: <input list="somelist" name="myBrowser" /> <datalist id="somelist"> <option value="option1"> <option value="option2"> <option value="option3"> </datalist>
For a bit more custom solution you can use jQuery UI's Autocomplete
To get more options you can use select2
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.