如何用easyui fileBox实现获取文件名并添加下拉框功能?

2026-04-15 10:463阅读0评论SEO问题
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计191个文字,预计阅读时间需要1分钟。

如何用easyui fileBox实现获取文件名并添加下拉框功能?

plaintextgistfile1.txtvar fileFlag=$( 'fileFlag' );

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); } });

如何用easyui fileBox实现获取文件名并添加下拉框功能?

本文共计191个文字,预计阅读时间需要1分钟。

如何用easyui fileBox实现获取文件名并添加下拉框功能?

plaintextgistfile1.txtvar fileFlag=$( 'fileFlag' );

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); } });

如何用easyui fileBox实现获取文件名并添加下拉框功能?