Editable Dropdown – HTML5


Editable dropdown in HTML5:

<label>
  Browsers list <input list="browsers" name="myBrowser" id="myBrowser" onclick="this.value=''" />
</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>

<input type="button" value="Get Value" onclick="alert(document.getElementById('myBrowser').value);" />