1 <!DOCTYPE HTML> 2 <html> 3 <body> 4 5 <form action="/example/html5/demo_form.asp"> 6 网页:<input type="url" list="url_list" name="link" /> 7 <datalist id="url_list"> 8 <option label="W3School" value="http://www.w3school.com.cn" /> 9 <option label="Google" value="http://www.google.com" /> 10 <option label="Microsoft" value="http://www.microsoft.com" /> 11 </datalist> 12 <input type="submit" /> 13 </form> 14 15 </body> 16 </html>
效果截图: