$.ajax({
url: '../../../../Function/Instance/Common/PartyBiz.asmx/GetOrgList',
type: 'POST',
data: { OrgType:1 },
dataType: 'html',
async: false,
success: function (res) {
var data = eval('(' + res + ')');
tree= $("#txtDW").ligerComboBox({
width: 180,
selectBoxWidth: 220,
selectBoxHeight: 200, textField : 'text',valueField :'id',treeLeafOnly:false,
tree: { data: data.Org,
idFieldName :'id',
parentIDFieldName :'pid',
checkbox : false
}
});
// $("#txtDW").ligerComboBox({
// onBeforeOpen: f_selectContact,width:150
url: '../../../../Function/Instance/Common/PartyBiz.asmx/GetOrgList',
type: 'POST',
data: { OrgType:1 },
dataType: 'html',
async: false,
success: function (res) {
var data = eval('(' + res + ')');
tree= $("#txtDW").ligerComboBox({
width: 180,
selectBoxWidth: 220,
selectBoxHeight: 200, textField : 'text',valueField :'id',treeLeafOnly:false,
tree: { data: data.Org,
idFieldName :'id',
parentIDFieldName :'pid',
checkbox : false
}
});
// $("#txtDW").ligerComboBox({
// onBeforeOpen: f_selectContact,width:150
});
注:此法下拉树不可折叠!!
法2:注释内容,事件绑定,在新窗口选择树,再返回内容
本文介绍如何使用Ajax从服务器获取组织列表,并利用LigerComboBox插件构建可选下拉树控件,实现组织结构的动态展示。
778

被折叠的 条评论
为什么被折叠?



