0

这是示例 html 文档。为喜欢的输入文本框添加了 datalist 标记。但它确实出现了。有任何想法吗?

<!DOCTYPE HTML>
<html>
    <head>
    <title>Example</title>

    <meta name="description" content="A simple example"/>

    </head>
    <body>
    <form method="post" action="WorkingWithFormsChapter.html" target="_blank">
        <label for="fave">Enther your favourite fruit</label>
        <input name="fave" autofocus="true" list="fruitslist"/>
        <br/>
        <label for="name">Enter your name</label>
        <input name="name" placeholder="Your name please" />
        <button>Submit Vote</button>
    </form>
    <datalist id="fruitslist">
        <option value="Tasty Apples">Apples</option>
        <option value="Juicy Oranges">Juicy Oranges</option>
    </datalist>
    </body>
</html>
4

1 回答 1

1

有用; 然而,目前某些浏览器对它的支持并不好。

于 2013-06-09T06:05:23.333 回答