Java easyui first drop-down box is checked by default

html code:

<tr>
<td>
   <Div style = "margin-bottom: 5px"> pricing:  

    <% - the first drop-down box is checked by default -%>
      <input type="text" id="cvaluetypeID" class="easyui-combobox" name="name"
            data-options = "valueField: 'id', textField: 'name', url: '/ valuation / findAll', prompt: 'Please select pricing', required: true, editable: false" style = "width: 140px" />
   </div>
</td>
<td>
   <div style="margin-bottom:5px;margin-left: 80px">
      <input class="easyui-textbox" id="specification" name="specification" style="width:220px" data-options="label:'规格型号:'">
   </div>
</td>
</tr>
js code:
 / * Easyui- get the first drop-down box is checked by default * /
      $("#cvaluetypeID").combobox({
		  onLoadSuccess:function (data) {
			  if(data){
                        $('#cvaluetypeID').combobox('select',data[0].id);
			  }
          }
	  });

 To confirm an ID selected by default the first drop-down box

My personal blog to learn Address: Welcome to sustained attention, mutual friends chain! www.tianyuan518.cn

Guess you like

Origin www.cnblogs.com/tianyuanblog/p/11736637.html