列出HTML5中输入值的各种选项
HTML<datalist>标记为<input>元素指定选项集。您可以尝试运行以下代码以列出HTML5中输入值的选项-
示例
<!DOCTYPE html> <html> <head> <title>HTML Datalist Tag</title> </head> <body> <input list = "tutorials" /> <datalist id = "tutorials"> <option value = "Java"> <option value = "ASP"> <option value = "PHP"> <option value = "Ruby"> <option value = "jQuery"> </datalist> <p>Try to add any of the tutorial name mentioned above.</p> </body> </html>