0

Is it possible to use datalist input with classname somehow?

<input list="browsers" class="browser">

<datalist class="browsers">
  <option value="Edge">
  <option value="Firefox">
  <option value="Chrome">
</datalist>
2
  • No, the class attribute is to link css style rules to an HTML element. The list attribute is to link an input with a datalist. HOWEVER, you could use javascript to find an element via class and then make the list attribute connection that way. Commented Apr 19, 2022 at 22:11
  • What you try to achieve? Commented Apr 20, 2022 at 5:14

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.