看看下面的选择:
<select>
<optgroup label="A">
<option value="">1</option>
<option value="">2</option>
<option value="">3</option>
<optgroup label="B">
<option value="">4</option>
<option value="">5</option>
<option value="">6</option>
</select>
When any element is selected I would like to display its label + value in the selection instead of just value. 因此,如果选择了 4,我希望选择显示 B - 4