我的客戶端希望上傳文件而不使用<form>
標籤&也沒有使用提交按鈕在PHP中。使用7個單獨的文件輸入標籤上傳7個文件使用AJAX或JQuery或JavaScript在PHP
我知道如何用PHP上傳文件,但我真的不知道如何去做,而不使用<form>
標籤。
他只希望我們使用<button>
標記。如何在不使用<form>
標記的情況下執行此操作。我到處搜索,但我沒有找到任何解決方案。 這裏是我的HTML代碼:
file1
<input type="file" id="file1" name="file1" accept="*.jpg"><hr>
file2
<input type="file" id="file2" name="file2" accept="*.jpg"><hr>
file3
<input type="file" id="file3" name="file3" accept="*.jpg"><hr>
file4
<input type="file" id="file4" name="file4" accept="*.jpg"><hr>
file5
<input type="file" id="file5" name="file5" accept="*.jpg"><hr>
file6
<input type="file" id="file6" name="file6" accept="*.jpg"><hr>
file7
<input type="file" id="file7" name="file7" accept="*.jpg"><hr>
<button id='upload' name='upload'>Upload</upload>
請幫助我,我想這非常糟糕。請不要因爲沒有完成足夠的工作而丟棄它。 謝謝。
我認爲這是不可能的。 Idiotic customer ... – Webice
@ksealey哈哈,iam等待他的回答,希望看到它 – Webice
你將不得不將它們包裝成一個''多'部分'屬性設置的'表格'標籤,通過'AJAX'將它們發送到服務器。 – Umair