Answers for "how to get text input in a dropdown"

11

textbox dropdown with manual input

<label>Choose a browser from this list:
<input list="browsers" name="myBrowser" /></label>
<datalist id="browsers">
  <option value="Chrome">
  <option value="Firefox">
  <option value="Internet Explorer">
  <option value="Opera">
  <option value="Safari">
  <option value="Microsoft Edge">
</datalist>
Posted by: Guest on May-08-2020
0

Getting the text from a drop-down box

var skillsSelect = document.getElementById("newSkill");
var selectedText = skillsSelect.options[skillsSelect.selectedIndex].text;
Posted by: Guest on July-24-2021

Code answers related to "how to get text input in a dropdown"

Browse Popular Code Answers by Language