jquery.fileupload.js 多文件上传
2021-05-15 22:29
标签:失败 mit one jquery pre set port 文件上传 idg } jquery.fileupload.js 多文件上传 标签:失败 mit one jquery pre set port 文件上传 idg 原文地址:http://www.cnblogs.com/chen1970s/p/7749866.htmlJS代码
/*源码上传*/
$(‘#doc0‘).fileupload({
autoUpload: true,
dataType: ‘json‘,
url: ‘/finance/fileUpload‘,
add: function (e, data) {
data.submit();
},
done: function (e, data) {
$.each(data.result.files, function (index, file) {
$(‘‘).text(file.name).appendTo(document.body);
});
},
fail: function (e, data) {
//错误提示
gritted(‘上传失败‘);
},
success: function (e, data) {
var file_size = e.size;
if (file_size / 1000 var fileSize = ‘ } else {
var fileSize = Math.round(file_size) / 1000;
}
});
//标签 multiple="" value=""/>
//需要引入的JS库{!! Theme::asset()->container(‘specific-js‘)->usep2ath()->add(‘fileUpload1‘,‘js/user/jquery.ui.widget.js‘) !!}
{!! Theme::asset()->container(‘specific-js‘)->usepath()->add(‘fileUpload2‘,‘js/user/jquery.iframe-transport.js‘) !!}
{!! Theme::asset()->container(‘specific-js‘)->usepath()->add(‘fileUpload3‘,‘js/user/jquery.fileupload.js‘) !!}
下一篇:PHP自动加载机制
文章标题:jquery.fileupload.js 多文件上传
文章链接:http://soscw.com/index.php/essay/85984.html