当前位置: 首页 > 工具软件 > FileBox > 使用案例 >

php easyui filebox,easyui fileBox 获取文件名和添加下拉框

丁业
2023-12-01

gistfile1.txt

var fileFlag = $('#file').filebox('getValue')

var index = fileFlag .lastIndexOf("\.");

fileFlag = fileFlag .substring(index + 1, fileFlag .length);

//easyeasyui 下拉框下拉框

//通知人员下拉框

$('#users').combobox({

url:'${ctx}/notice/getUserList',

method:'post',

valueField:'id',

textField:'name',

sortName:'name',

panelHeight:'180',

multiple:true,

formatter: function (row) {

var opts = $(this).combobox('options');

return '' + row[opts.textField]

},

onShowPanel: function () {

var opts = $(this).combobox('options');

var target = this;

var values = $(target).combobox('getValues');

$.map(values, function (value) {

var el = opts.finder.getEl(target, value);

el.find('input.combobox-checkbox')._propAttr('checked', true);

})

},

onLoadSuccess: function () {

var opts = $(this).combobox('options');

var target = this;

var values = $(target).combobox('getValues');

$.map(values, function (value) {

var el = opts.finder.getEl(target, value);

el.find('input.combobox-checkbox')._propAttr('checked', true);

})

},

onSelect: function (row) {

//console.log(row);

var opts = $(this).combobox('options');

var el = opts.finder.getEl(this, row[opts.valueField]);

el.find('input.combobox-checkbox')._propAttr('checked', true);

},

onUnselect: function (row) {

var opts = $(this).combobox('options');

var el = opts.finder.getEl(this, row[opts.valueField]);

el.find('input.combobox-checkbox')._propAttr('checked', false);

}

});

 类似资料: