プログラマーな日々

I'm a Cloud Architect and Developer, and a trainee of the network engineer training course. I have certified by AWS and Cisco (SAA/SOA/DVA/CCNA). I especially have highly motivated to reduce toils.

datalist要素

テキストフィールドの入力候補を表します。

使用例

<!DOCTYPE html>
<html lang="ja">
<head>
<title>Hello! HTML5</title>
<meta charset="UTF-8">
</head>
<body>
    <form action="./regeister.html" method="post" id="order">
        <datalist id="suggest">
            <option>apple</option>
            <option>orange</option>
            <option>grape</option>
        </datalist>
        <p>
        <input type="text" name="fruits" list="suggest" />
	<button type="submit">送信</button>
        </p>
    </form>
</body>

レンダリング

初期表示

"a"を入力