你好,我把我的机会,在这里堆,因为uploadify论坛是不是非常敏感,充满垃圾邮件,多Uploadifive在一个页面无法正常工作
我使用uploadifive W /拖放它是惊人的,但多在一个页面上传按钮不起作用。下面是我的代码:
HTML
<input type="file" name="file_upload_1" id="file_upload_1"/>
<input type="file" name="file_upload_2" id="file_upload_2"/>
JS
$('#file_upload_1').uploadifive({
'auto' : true,
'method' : 'post',
'queueID' : 'queue',
'fileType' : ['text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel','application/force-download'],
'uploadScript' : 'upload.php',
'onUploadComplete' : function(file, data) {
console.log(data);
}
});
$('#file_upload_2').uploadifive({
'auto' : true,
'method' : 'post',
'queueID' : 'queue',
'fileType' : ['text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel','application/force-download'],
'uploadScript' : 'upload.php',
'onUploadComplete' : function(file, data) {
console.log(data);
}
});
您的id在html中需要不同。而jQuery应该使用ID。也许你......切换了'id ='和'name =',忘记输入2了? – irrelephant 2012-08-13 08:31:27
嗨@irrelephant,对不起,它在这里堆叠错字,我已经编辑我的HTML。上面的代码不起作用。 – jalf 2012-08-13 08:35:29
@jalf,现在去编辑 – Alexander 2012-08-13 08:44:11