PHP + jQuery + Ajax implement multi-Image Upload effect _ jquery

Source: Internet
Author: User
In this article, we use an Ajax form submission plug-in: jqery. form. js. Someone has modified several lines of code and renamed it jquery. wallform. js. Let's take a look at this magical jQuery plug-in. Today, I want to share with you how to use PHP + jQuery + Ajax to upload multiple images without refreshing new pages. You only need to click to select the image to be uploaded, and then the image is automatically uploaded to the server and displayed on the page.


We place a form on the page and use post to submit it to the backend php processing program upload. php. Note that the enctype attribute setting must support file upload. # Preview is used to display the uploaded image. For more information about css style settings, see the source code of the downloaded package.

The Code is as follows:

The maximum size is KB. jpg, gif, and png formats are supported.

This example is based on jQuery. Therefore, the jquery library and jquery. wallform. js must be loaded on the page.

The Code is as follows:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.