0

If I set the name or id of an Input with a list like 'cia' two strange selectable values appear at the bottom of it. Gas and gas. Any idea why?

   <input list="browsers" id="cia">
   <datalist id="browsers">
   <option value="Internet Explorer">
   <option value="Firefox">
   <option value="Chrome">
   <option value="Opera">
   <option value="Safari">
   </datalist>

Fiddle https://jsfiddle.net/fredsaavedra/ktwrpjby/

lisandro
  • 454
  • 4
  • 12

1 Answers1

1

You might have typed it into a datalist with the same ID before and your browser has cached it. Try incognito mode and they should be gone.

You can try and prevent caching with the answers mentioned here How to turn off autocomplete while keep using datalist element in html

ButchMonkey
  • 1,873
  • 18
  • 30
  • You're right, autocomplete = off did the work! just seeing it appearing in the w3 try it and in fiddle puzzled me! But was only in Chrome when I've tested after reading your answer Tks! – lisandro Dec 23 '19 at 09:04