多个文件上传使用jQuery [英] Multiple File Upload Using jQuery
本文介绍了多个文件上传使用jQuery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
文件上传:
此application.js。文件..
File Upload:
This application.js. file..
/*
* jQuery File Upload Plugin JS Example 5.0.2
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2010, Sebastian Tschan
* https://blueimp.net
*
* Licensed under the MIT license:
* http://creativecommons.org/licenses/MIT/
*/
/*jslint nomen: true */
/*global $ */
$(function() {
''use strict'';
// Initialize the jQuery File Upload widget:
$(''#fileupload'').fileupload();
// Load existing files:
$.getJSON($(''#fileupload form'').prop(''action''), function(files) {
var fu = $(''#fileupload'').data(''fileupload'');
fu._adjustMaxNumberOfFiles(-files.length);
fu._renderDownload(files)
.appendTo($(''#fileupload .files''))
.fadeIn(function() {
// Fix for IE7 and lower:
$(this).show();
});
});
// Open download dialogs via iframes,
// to prevent aborting current uploads:
$(''#fileupload .files a:not([target^=_blank])'').live(''click'', function(e) {
e.preventDefault();
$(''<iframe style="display:none;"></iframe>'')
.prop(''src'', this.href)
.appendTo(''body'');
});
});
使用jquery在asp.net上的多个上传文件中出现此错误。
This error in Mutiple upload files in asp.net with jquery.
Uncaught TypeError: Object #<Object> has no method 'fileupload' application.js:19
(anonymous function) application.js:19
e.resolveWith jquery.min.js:16
e.extend.ready jquery.min.js:16
c.addEventListener.z
Please say correct solution Friends!
Advance Thanks Friends!
推荐答案
* /
( function(){
''use strict'';
//初始化jQuery文件上传小部件:
(function() { ''use strict''; // Initialize the jQuery File Upload widget:
(''#fileupload'' ).fileupload();
//加载现有文件:
(''#fileupload'').fileupload(); // Load existing files:
这篇关于多个文件上传使用jQuery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文