我试图设置默认值,即如果this.state.items.gender在选择选项中是女性,它必须显示女性,如果是男性,默认值必须是男性。<select name="gender" defaultValue={this.state.items.gender} //onload this value must show in select</e
我能够获得先前选择的值,但是当我试图将先前选择的值设置为默认值时,它就无效了。有人能告诉我我犯了什么错误吗?我的代码如下, var selecedvalue = $('#select-choicedistinct Category from Locationlog;", [], function (tx, res) {
$("#
如何在Select2中首先设置占位符而不是默认值<select class = "select2" style = "width:100%" id = "selectme"><option value = "oldest"> Person 2</option>
<option value = "oldest"> Person 3&