HTML5 File API改善網頁上傳功能

2022-09-24 11:18:09 字數 498 閱讀 2213

html 5讓 html 這個一度單純的置標語言煥發出成熟的魅力,使之成為 web 開發者的強力工具。 近日w3c又推出乙個新草案——html5 file apwww.cppcns.comi,這個 api 將讓大大改善基於web 的檔案上傳操作,甚至可以實現直接將檔案從桌面拖放至web。

該草案使用 nput type=&quwww.cppcns.comot;file" />  實現檔案的上傳,beocfjcji而其對應的 api 為開發者提供了操控上傳資料與上傳進度的機制。不過,目前對該 api 提供支援的瀏覽器還少得可憐,真正支援的瀏覽器似乎只有 firefox 3.6。如果使用最新的 firefox 3.6 版,可以在演示頁體驗檔案拖放式上傳。

同時,該 api 還許諾將為 web 程式提供一種機制,使得檔案上傳操作接近桌面程式的體驗,同時拖放多個檔案到 web 並單獨顯示每個上傳程序的進度狀態。

本文標題: html5 file api改善網頁上傳功能

本文位址: /web/html5/7630.html

HTML 5 File API應用例項 訪問本地

關於html 5,51cto已陸續報道了幾篇關於html 5應用技巧方面的文章,比如 探秘html 5鏈結預取功能 html 5 web sockets應用初探 等等,下面我們將介紹乙個簡單的應用,該應用主要使用了html 5中的filereader方法,filereader就是html 5所提供的...

HTML5的File API讀取檔案資訊

html結構 div id fileimage div input type file value upload id fileinput p id fileinfo p css樣式 fileimage fileinfojs var fileinput document.getelementbyid...

HTML5網路發布

html html lang en head meta charset utf 8 title title title style type text css form input style head body form action fieldset legend 完善個人資料 legend p...