1
我使用的是valums ajax file upload,我在同一頁面上有多個上傳按鈕時遇到了一些問題。可能是我錯過了什麼?valums ajax fileupload具有多個上傳按鈕
下面是代碼1的上傳按鈕。
<div id="file-uploader-demo1">
<noscript>
<p>Please enable JavaScript to use file uploader.</p>
<!-- or put a simple form for upload here -->
</noscript>
</div>
<script>
function uploader(){
var uploader1 = new qq.FileUploader({
element: document.getElementById('file-uploader-demo1'),
action: 'do-nothing.htm',
debug: true
});
}
// in your app create uploader as soon as the DOM is ready
// don't wait for the window to load
window.onload = uploader;
</script>
謝謝。 Aanu
你有什麼問題? –
如果我創建另一個按鈕,它甚至沒有顯示,也沒有錯誤信息。 – Aanu
固定。只需向Uploader()函數傳遞一個唯一參數即可解決問題。 – Aanu