Beginner
    AJAX
    Android
    ASP.Net
    C#
    Cloud Computing
    Crystal Report
    Database
    Drupal
    HTML5
    JavaScript
    Joomla
    JQuery
    MVC
    php
    Reporting
    SharePoint
    SQL Server
    VB.Net
    Windows Phone
    WordPress
    WPF
Follow Us
Follow _MindStick_ on Twitter View MindStick Software's LinkedIn profile View MindStick Software's Facebook profile
Top Contributor
Advertisement
Advertise with Us
Mindstick
Article Article  Forum Forum  Blog Blog  Quiz Quiz  Beginner Beginner  Careers Careers  Contact Contact  Login Login  
Home | Product | Services | About Us | Interview | DeveloperSection | Submit an Article | Submit Blog

Home >> HTML5 >> HTML5 datalist element




HTML5 datalist element - MindStick

HTML5 datalist element

In HTML5 <datalist>element can be used in conjunction with an <input> element that contains a list of attribute. We create list with <option>element inside in <datalist>element. The list attribute is linked to the <datalist> element by the <datalist>element id. The datalist element specifies a list of option for an input field. To bind a datalist to an input field, let the list attribute of the input field refer to the id of the datalist. This will work as autocomplete textbox in html.

Code:

<body>

    Enter your favorite Crickter

    <input type="text" id="Cricktername" list="name">

    <datalist id="name">

      <option value="Sachin Tendulkar" />

      <option value="Virender Shewag" />

      <option value="M S Dhoni" />

      <option value="Yuvraj Singh" />

      <option value="Suresh Raina" />

      <option value="Yusuf Pathan" />

    </datalist>

</body>

HTML5 datalist element



 Author Information
Name: Awadhendra Tiwari
Member Since: 1/19/2011
Article Submitted Date: 7/23/2011
Location:     India
Report Abuse Form
Reason:    
 
Total Online Users: 7232
Advertisement
MindStick SurveyManager
Advertise with Us
  
Dudelabs
Copyright © 2013MindStick. All Rights Reserved.