你好,我把我的機會,在這裏堆,因爲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