script里
<script type="text/javascript">
$(document).ready(function(){
var key=$("#selectRefundReason").val();
//根据值让option选中
$("#refundReason option[value='"+key+"']").attr("selected","selected");
});
</script>
div里
<td align="center" style="background-color: #E7F3FB;
vertical-align: middle;" width="20%" height="50px">
<font>原因:</font>
</td>
<td align="left" style="vertical-align: middle;">
<input type="hidden" id ="selectRefundReason" value="${后台传来的值}"/>
<select class="easyui-combobox" name="refundReason" id="refundReason"
style="resize: none" data-options="width:220,height:30,editable:false,panelHeight:'auto'">
<c:forEach items="${refundReasonList后台传来的键值对集合}" var="each">
<option value="${each.dataKey}">${each.dataValue}</option>
</c:forEach>
</select>
</td>
简单情况下
<th>是否共享航班</th>
<td>
<input id="codeShareValue" type="hidden" class="span2" value="${后台传来的值}" >
<select name="codeShare" id="codeShare" class="easyui-validatebox span2">
<option value="0">否</option>
<option value="1">是</option>
</select>
</td>
$(document).ready(function(){
var Flag=$("#codeShareValue").val();
//alert(Flag);
//根据值让option选中
if(Flag=="0"){
$("#codeShare option[value='"+Flag+"']").attr("selected","selected");
}else if(Flag=="1"){
$("#codeShare option[value='"+Flag+"']").attr("selected","selected");
}
});