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