This article describes how to use Jquery to use the FormData attribute of HTML5 to upload files. it is very practical. if you need it, you can refer to it. 1. use the FormData attribute of HTML5 in Jquery to upload files.
Before HTML5, if we need to implement functions such as file upload server, sometimes we have to rely on FLASH for implementation. after HTML5 comes, we can easily upload files, you only need to use a FormData attribute of HTML5 and Jquery to easily upload files and read the file upload progress. the following Upload case is based on the above implementation, below I will put all JS, CSS and HTML page code below.
Note: The FormData attribute must depend on HTML5. Therefore, if you follow the functions implemented in the code in this article, the browser must be updated to the latest version (HTML5 FormData attribute is supported ).
2. the HTML page code is as follows:
Use the FormData attribute of HTML to upload files
Add file