如何使用 HTML 建立檔案上傳按鈕?


要使用 HTML 建立檔案上傳按鈕,程式碼如下 −

示例

<!DOCTYPE html>
<html>
<head>
<h1>File upload button example</h1>
<p>Click on the "Choose File" button to upload a file:</p>
<form>
<input type="file" id="FILE" name="filename">
</form>
</body>
</html>

輸出

以上程式碼將產生以下輸出 −

單擊“選擇檔案”按鈕 −

更新日期: 2023 年 11 月 21 日

1K+ 次瀏覽

開啟你的 職業生涯

完成課程,獲取認證

開始
廣告
© . All rights reserved.