也許我的問題是重複的,但我嘗試了很多在這裏找到的答案,沒有成功。用單獨上傳按鈕修改的輸入類型文件
在我的jsp頁面上,我有一個輸入類型文件,還有一個上傳按鈕,它會觸發上傳。事情是這樣的:
<div id="test_form">
<input type="file" id="file" style = "position:absolute; top:-100px;">
<button id="selectFileButton">Please choose file</button>
</div>
<button id="upload">Upload selected file</button>
而一些JS:
$(document).ready(function() {
$("#selectFileButton").click(function() {
$("#file").click();
});
});
,當我在「請選擇文件」按鈕,單擊時,顯示爲選擇一個新的窗口。但是,當我選擇文件,一切都消失了,所以我現在能夠擊中實際的「上傳」按鈕。 你能幫我嗎?
'一切順利away'什麼是一切嗎? – Pinal
與頁面上的所有元素一樣,它向我顯示一個空白頁面。 –