PHP前端开发

在HTML5中列出各种输入值选项

百变鹏仔 3个月前 (09-21) #HTML
文章标签 选项

HTML的标签指定了元素的一组选项。您可以尝试运行以下代码,在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>