0
I have a datalist
, that I wear like this:
<input id="estabelecimento" list="listaEstabelecimento"/>
<datalist id="listaEstabelecimento">
<option value="valor1" label="label1"></option>
</datalist>
Use this component to make the effect autocomplete
. In the code, I use $("#estabelecimento").val()
to filter the data. Using $("#estabelecimento").val()
he returns me the label1
. How do I get the valor1
? 'Cause I need him, too.
That one
datalist
is associated with ainput
, right? So why are you taking the value ofdatalist
and not ofinput
?– Woss
I wrote it wrong, I use it the same way I changed it now
– Italo Rodrigo