Jump to content

How To Make A Datalist In Javascript?


aahaider

Recommended Posts

I want to make a datalist which work like a html5 datalist.As you can see in many website like google when

you enter any keyword it gives a relative words for auto completaion.I know google use database for auto compeltaion

But it is not a problem,I want to get only like this list.

http://www.quackit.com/html_5/tags/html_datalist_tag.cfm

Here is a html5 datalist.But old doesnot support this.I want to make a datalist like this in javascript which works

in all browser except those who do not support javascript.

I hope it can understand you.Thanks

What you would do is create a hidden <div> tag and then show it when the user puts focus on the desired input. There are some scripts out there that will enable <datalist> functionality via JS for older browser while letting browsers that support it handle it on their own. Check this HTML5 Polyfills list for a bunch of compatibility scripts. There is a section for <datalist>, just do a search on that page.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.