Input Attr : DataList
Datalist is seem like type-ahead auto suggest textbox as you can see in Google search box. Of course, it is only "seem-like" but not even close to it.
Datalist is like a "Select" dropdown list but user can freely input anything in the textbox other than what are listed in dropdown. As with <SELECT> dropdown everything is in client side.
Before we get into the code and demo, let's first check out which browser that is currently supporting it.
Browsers | Datalist Support |
---|---|
IE 10 | ✓ |
Firefox 4 | ✓ |
Safari 5 | |
Chrome 20 | ✓ |
Opera 11 | ✓ |
Let's look into how to accomplish HTML5 Datalist. Pretty simple!
Feel free to try the Datalist demo! Just enter your country name.
If you do not have the browser that support it, here is how it looks like in Firefox 4.
