<!--下拉框树-->
<script type="text/javascript">
$('#cbLevel').combotree({
url: "../../../Handler.ashx?ac=Lesson.BindMenu41",
editable: false,//不可编辑
required: true,
onLoadSuccess: function (node, data) {
$("#cbLevel").combotree('tree').tree("collapseAll");
var id = $('#txtLevel').val();
if (id != 0) {
$('#cbLevel').combotree('setValue', id);
}
},
onChange: function (nval, oval) {
$.ajax({
url: "ClueAdd.aspx?ac=get&fId=" + nval + "&" + Math.random(),
async: false,
success: function (data, textStatus) {
$('#subject').empty();
$.each(data, function (i, val) {
var html = '<input class="cb_subject" type="checkbox" id="cb_' + val.fId + '" fId="' + val.fId + '" /><label for="cb_' + val.fId + '">' + val.fName + '</label>';
$('#subject').append(html);
});
},
error: function (obj, msg, ex) {
top.MsgTips('加载科目失败!原因:' + ex, 2);
}
});
}
});
</script>
<script type="text/javascript">
$('#cbLevel').combotree({
url: "../../../Handler.ashx?ac=Lesson.BindMenu41",
editable: false,//不可编辑
required: true,
onLoadSuccess: function (node, data) {
$("#cbLevel").combotree('tree').tree("collapseAll");
var id = $('#txtLevel').val();
if (id != 0) {
$('#cbLevel').combotree('setValue', id);
}
},
onChange: function (nval, oval) {
$.ajax({
url: "ClueAdd.aspx?ac=get&fId=" + nval + "&" + Math.random(),
async: false,
success: function (data, textStatus) {
$('#subject').empty();
$.each(data, function (i, val) {
var html = '<input class="cb_subject" type="checkbox" id="cb_' + val.fId + '" fId="' + val.fId + '" /><label for="cb_' + val.fId + '">' + val.fName + '</label>';
$('#subject').append(html);
});
},
error: function (obj, msg, ex) {
top.MsgTips('加载科目失败!原因:' + ex, 2);
}
});
}
});
</script>