Jquery + ajax + php image Upload recently wrote the course design of "online shopping mall", using image upload.
I want to implement the following functions: (1) uploading multiple images, but of course there are limits. a maximum of five images can be uploaded; (2) previewing images; (3) ability to delete images; (4) the server can obtain uploaded image information.
I found a lot of such code from the Internet, but it was not very nice. This evening I finally found one, which is very good and clear.
Post original address: http://www.helloweba.com/view-blog-189.html
The image upload here uses jquery, which is compatible with mainstream browsers and easy to understand and modify. At the same time, this article solves one of my questions, that is, I read that many websites only have one input tag to upload images, but I don't know how to implement it. However, he can only upload one image here, but he can only upload multiple images after a small modification. let's take a look at the specific content. I will not talk about it much, but I have already explained it in detail.
Real-time upload is required for many projects. for example, you can select a local image to upload and display the image immediately. This document uses examples to illustrate how to use jQuery and PHP to implement the Ajax instant file upload function. you only need to select a local image to complete the upload and display the upload progress bar. after the upload is complete, displays image information.
HTML
This example is based on jQuery and excellent jquery. form plug-ins. Therefore, you must first load the jquery library and form plug-ins.