Datalist element in HTML 5

Datalist is added in HTML 5. This element is used inside a form to receive data from user.
  • It displays options for the users to select.
  • It is with auto complete feature helping users as they type in the text box
  • Unlike drop down list box or radio button user can write any text without limiting to options given by datalist.
  • Datalist is binded ( or linked ) by input element list attribute.
<input name="section" list="scripts" />

<datalist id="scripts"> <option value="PHP" /> <option value="JavaScript" /> <option value="ASP" /> <option value="Dot Net" /> <option value="Perl" /> <option value="JSP" /> </datalist>
Here is the demo of Datalist.





Datalist is a powerful tool for developers. Here are some of the applications.

Adding options to a Datalist by JavaScript

Adding options to a Datalist from MySQL table by using PHP and Ajax

Displaying Matching words by using Autocomplete while entering text JQuery UI

Datalist is not supported by Safari browser.
Visitors Rating
Your Rating




Google+
vamsi

24-11-2014

How can i make to submit the form after selecting a option from datalist ??

Post Comment This is for short comments only. Use the forum for more discussions.




HTML . MySQL. PHP. JavaScript. ASP. Photoshop. Articles. FORUM Contact us
©2000-2018 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer