jqxWidgets 常用代码

数据源

function getOptTypeList(){
    $.ajax({
        url: "getOptTypeList.action",
	type:'POST', 
	datatype: "json",
	async: false,
	success:function(data,textStatus){
	    optTypeList=data.getOptTypeList;
        }
    });
};

下拉列表 jqxDropDownList

$("#optType_behind").jqxDropDownList({ source: optTypeList, displayMember: "OPT_TYPE_CN",valueMember: "OPT_TYPE",  '170', dropDownHeight: 100});
$('#optType_behind').on('select', function (event) {
    var args = event.args;
    var item = $('#optType_behind').jqxDropDownList('getItem', args.index);
    if (item != null) {
        optType = item.value;
        optName = item.label;
    }
});
		    

jqxListBox

$("#factor").jqxListBox({ source: objTypeList, displayMember: "DD_ITEM_NAME", valueMember: "OBJ_TYPE",  200, height: 150, theme: '' });
$('#factor').bind('select', function (event) {
    var args = event.args;
    var item = $('#factor').jqxListBox('getItem', args.index);
    if (item != null) {
        factor = item.value;
        factorCn = item.label;
    }
});

原文地址:https://www.cnblogs.com/keyboardone/p/7918859.html