您的位置:首页 > 产品设计 > UI/UE

easyui ComboBox设置默认值

2017-06-03 16:02 387 查看
 学年: 

<!-- 修改默认日期显示 -->

<input class="easyui-combobox" id="oa_dutyMg_daily_category_index_term_form_year"

name="entity.schoolYear" data-options="editable:false" />

<script type="text/javascript">

$(function(){ 

$('#oa_dutyMg_daily_category_index_term_form_year').combobox({

url:'${pageContext.request.contextPath}/dutyMg/daily/category/index.do?schoolYearList=',

valueField:'schoolYear',

textField:'schoolYearText',

onLoadSuccess: function (data) {

if (data) {

var myDate = new Date();

$("#oa_dutyMg_daily_category_index_term_form_year").combobox('select',myDate.getFullYear()-1);

}  

}

})

})  

</script>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息