Home >Web Front-end >HTML Tutorial >datalist tag
datalst can be used together with the new attribute list of input to create a combo box. When double-clicking the input, options can be provided for the user to choose, similar to history records.
<input list="browsers"> <datalist id="browsers"> <option value="Safari"> <option value="Internet Explorer"> <option value="Opera"> <option value="Firefox"> </datalist>
Definition and Usage
fc86e7b705049fc9d4fccc89a2e80ee3 Tag definition option list. Use this element in conjunction with an input element to define the possible values of the input.
The datalist and its options will not be displayed, it is just a list of legal input values.
Please use the list attribute of the input element to bind the datalist.
Related articles:
HTML5 Daily Practice: The use of automatic completion of datalist tags
Examples of using html5 datalist tags (automatic Complete components)