我正在使用 jquery.fileupload.js 和 jquery 1.7.2。
<input class="file_upload_start" type="file" name="files[]" original-title="" multiple="multiple">
我的 file.js:http ://www.kcloud.vn/apps/files/js/files.js
$(function () {
$('.file_upload_start').fileupload({
dropZone:$('#content'), // restrict dropZone to content div
add:function (e, data) {
var files = data.files;
var totalSize = 0;
data.submit().success(function (data, status) {
response = jQuery.parseJSON(data[0].body.innerText);
if (response[0] != undefined && response[0].status == 'success') {
var file = response[0];
delete uploadingFiles[file.name];
$('tr').filterAttr('data-file', file.name).data('mime', file.mime);
var size = $('tr').filterAttr('data-file', file.name).find('td.filesize').text();
if (size == t('files', 'Pending')) {
$('tr').filterAttr('data-file', file.name).find('td.filesize').text(file.size);
}
FileList.loadingDone(file.name);
}
当我运行它时,我收到错误:
SCRIPT438:对象不支持属性或方法“提交”
files.js,第 387 行字符 37
如何修复它?