Setting hidden datalist option values
问题 In the snippet below, I have two methods to choose an item: input with datalist and traditional select with options. The select element keeps the option values hidden, and we're still able to get it with this.value . However, with the datalist, the value is actually displayed and the text content of the option is displayed as a secondary label. What I'd like is to have the input+datalist approach behave like a traditional select, where "Foo" and "Bar" are shown as options that when selected