如何引用
将list 属性用于<datalist>元素,该属性包含HTML中<input>元素的预定义选项。您可以尝试运行以下代码以实现list 属性-
示例
<!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>