DataList List of options
A new form feature that has been long awaited is that users can now create their own entries from a drop-down menu. As we all know, the Select element is limited to the specified option value the Web Developer's past practice is to add an expandable list of options to the text field through various JavaScript techniques.
Now H5 is a good solution to this problem. The new element DataList and the option element are essentially similar, all of which implement the functionality of the container. But now we can assign any INPUT element to the DataList element to display the desired options.
The code is as follows:
<!DOCTYPE HTML><HTML> <Head> <MetaCharSet= "Utf-8" /> <title></title> </Head> <Body> <form> <P> <label for= "url"Center; ">Goto</label>/ http<inputtype= "text"ID= "url"name= "Homepage"List= "homepages Autofocus"/> <DataListID= "Homepages"> <optionvalue= "Www.geogle.com"></option> <optionvalue= "Html5.komplett.cc/welcom"></option> <optionvalue= "slashdot.org"></option> <optionvalue= "Wired.com"></option> </DataList> <inputtype= "Submit"onclick= "window.location= ' http://' +document.getelementbyid (' url '). Value;return false; "name=""ID=""value= "Take Off"Align= "Center"/> </P> </form> </Body></HTML>
Why does the pull-down effect come out?
Smart forms-fill in URL addresses with DataList elements