Jquery dynamic loading of image data exercise code _ jquery

Source: Internet
Author: User
Here, I just made a casual step. The photo list and two buttons are shown above. Click a small image to display a large image. When you click a button, you can view the images on the next page and the previous page. After studying jquery over the past few days, I feel the strength of this library and find a good book. < <锋利的jquery> >
Here, I just made a casual step. The photo list and two buttons are shown above. Click a small image to display a large image. When you click a button, you can view the images on the next page and the previous page.
Ideas:
1. First, create viewer.htm on the photo album page. The layout is simple. The picture is shown in the figure above and two buttons. below is the big picture.
2. Create a general processing program viewServer. ashx to process the request for viewing the photo page.
3. Then, of course, you need to use the database, including the image path, description, and other information. The path of each small image should correspond to a large image. When you click a small image, the image is loaded.
4. Data Transmission uses json to create a function for loading images. When the page is loaded or the left or right buttons are clicked, the image is loaded through ajax, pass the start and end numbers of the requested image to the background page,
After receiving the request information, the background page searches for the required image information in the database.
Effect

Implementation Code:
Viewer.htm

The Code is as follows:





My photos

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: info-contact@alibabacloud.com 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.