Currently, there are several common asynchronous file upload functions, such as using the iframe framework, ajax functions, and flash + php functions. For more information, see
Currently, there are several common asynchronous file upload functions, such as using the iframe framework, ajax functions, and flash + php functions. For more information, see
Currently, there are several common asynchronous file upload functions, such as using the iframe framework, ajax functions, and flash + php functions, the following is an example of how ajax and iframe Implement Asynchronous file upload.
Method 1: Use jquery ajaxfileupload. js to upload files
In fact, it is to implement the upload of non-Refresh files. The IFRAME File Upload principle can be used.
In fact, when using PHP to upload files... You can only use $ _ FILES, but if we only use JS to retrieve its ID, as shown in..Doc ument. getElementById ('img '). $ ("# img") in the form of value or jquery cannot be uploaded in real time (but many people still do this, and I did it at the beginning ).
However, what should I do if I need to implement the so-called "Asynchronous upload" function? You can only use third-party components or write one by yourself (embed an IFRAME In the webpage ). However, if you are considering the development time, we recommend that you use a third party. Here we have a good Ajax File Upload Component called "ajaxfileupload. js? 6.1.3 ", its components are:
Process:
(1) Front-End file code: test. php
The Code is as follows: