datalist tag

PHP中文网
Release: 2017-03-27 16:56:53
Original
2527 people have browsed it

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>
Copy after login

Definition and Usage

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)

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!