At present, we often use several asynchronous file upload functions. For example, I initially used the iframe framework to achieve the same effect. In the future, the real ajax function was achieved, to the final flash + php function, I will introduce the example of ajax and iframe implementing the asynchronous file upload function. At present, we often use several asynchronous file upload functions. For example, I initially used the iframe framework to achieve the same effect. In the future, the real ajax function was achieved, to the final flash + php function, I will introduce the example of ajax and iframe implementing the asynchronous file upload function.
Script ec (2); script
Method 1: upload a file using jquery ajaxfileupload. js
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, use a third party. Here, there is a good jQuery Ajax File Upload Component, which is "ajaxfileupload. js" whose component is: callback.
Process:
(1) Code of the front-end file: test. php