3 ms·
> HTML don't have combobox build-in Yes, it does. Supported in browsers since 2010, specified earlier. You have not taken the time to research this topic.
by bmn__ 5y ago
> HTML don't have combobox build-in
Yes, it does. Supported in browsers since 2010, specified earlier. You have not taken the time to research this topic.
<input list="administrative_areas" name="PRC_AA" />
<datalist id="administrative_areas">
<option value="华北">
<option value="东北">
<option value="华东">
<option value="中南">
<option value="西北">
<option value="西南">
</datalist>
Type `南` to test.
- 8n4vidtmkvmk 5y agoIt's not very good tho. It offers some autocomplete suggestions once you type the first character, but there's no indicator that there's a hidden list there. It seems if you double click on the input you can pull up the full list, but no one would know that.
- mmis1000 5y agoI think this don't really work as a combo box on firefox, more like auto complete. It is some what a replacement on chrome, because chrome decide to show it with arrow point to bottom. And in both firefox and chrome. It don't even have a indicator display by default to tell you "you are supposed to select it, not type it" or "Type yourself is invalid, you need to use predefined options".