1
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Example</title>
<style>
</style>
</head>
<body>
<form action="">
<label for="myFruit">What's your favorite fruit?</label>
<input type="text" name="myFruit" id="myFruit" list="mySuggestion">
<datalist id="mySuggestion">
<option>Apple</option>
<option>Banana</option>
<option>Blackberry</option>
<option>Blueberry</option>
<option>Lemon</option>
<option>Lychee</option>
<option>Peach</option>
<option>Pear</option>
</datalist>
<input type="submit" value="de">
</form>
<script>
</script>
</body>
</html>
In the above example when you click on the text box(input="text"
) immediately the data automatically suggested by <datalist>
, but what I would like in this case would be only when the user starts typing, then yes the data appeared.
Something Thus?
– MauroAlmeida
Exactly what I was looking for! Now yes, thanks for the help.
– Leandro Nascimento
You’re welcome, go ahead ;)
– MauroAlmeida