js插件之Ocupload
2021-07-13 11:05
标签:let auto file sub contex select bar rip cti 使用方法: 实例: js插件之Ocupload 标签:let auto file sub contex select bar rip cti 原文地址:http://www.cnblogs.com/czb2580/p/7078624.html
var myUpload = $(element).upload({
name: ‘file‘,
action: ‘‘,
enctype: ‘multipart/form-data‘,
params: {},
autoSubmit: true,
onSubmit: function() {},
onComplete: function(response) {},
onSelect: function() {}
});
[javascript] view plain copy
$("#button-import").upload({
name: ‘upload‘, //
action: ‘${pageContext.request.contextPath}/importSubarea.action‘, // 提交请求action路径
enctype: ‘multipart/form-data‘, // 编码格式
autoSubmit: true, // 选中文件提交表单
onComplete: function(response) {// 请求完成时 调用函数
if(response=="success"){
alert("数据导入成功!");
}
}
});
上一篇:CSS创建透明图像