$('#loadType').combobox(
{
<span style="white-space:pre"> </span>url : "${pageContext.request.contextPath}/QuestionType?couresId="+ courseId,
<span style="white-space:pre"> </span>editable : false, //不可编辑状态
<span style="white-space:pre"> </span>cache : false,
<span style="white-space:pre"> </span>panelHeight : '150',//自动高度适合
<span style="white-space:pre"> </span>valueField : 'questionTypeId',
<span style="white-space:pre"> </span>textField : 'questionTypeName',
<span style="white-space:pre"> </span>onLoadSuccess : function() { //加载完成后,设置默认选中第一项
<span style="white-space:pre"> </span>var data = $(this).combobox("getData");
<span style="white-space:pre"> </span>for ( var item in data[0]) {
<span style="white-space:pre"> </span>if (item == "questionTypeId") {
<span style="white-space:pre"> </span>$(this).combobox("select",data[0][item]);
<span style="white-space:pre"> </span>}
<span style="white-space:pre"> </span>}
<span style="white-space:pre"> </span>},
<span style="white-space:pre"> </span>//根据老师选择的课程,查询课程下面的试题情况。
<span style="white-space:pre"> </span>onSelect : function() {
<span style="white-space:pre"> </span>loadDG();
<span style="white-space:pre"> </span>}
});
EasyUI 之 下拉框默认选择第一个选项
最新推荐文章于 2024-10-01 21:28:00 发布