In addition, you can click the previous image or the next image to flip the page.
The implementation process is as follows:
Pic_small.aspx Code Is:
Copy code The Code is as follows: ) "src = '<% #" images/product/"+ databinder. eval (container. dataitem, "picurl") %> 'width = "118" runat = "server">
Showwindow is saved in the openwindows. js file with the following content:
Functionshowwindow (ID)
{
Window. Open ('pic _ all. aspx? Id = '+ id,' _ blank ', 'rollbars = no ');
}
The following code displays the image information on the pic_all.aspx page after a thumbnail is clicked. The pic_all.aspx page is automatically adjusted based on the image size.
Place the following code between Copy codeThe Code is as follows: <SCRIPT>
Functionwindow. onload ()
{
Varobj = Document. getelementbyid ("picurl ");
Window. resizeTo (obj. offsetwidth + 127, obj. offsetheight + 75 );
}
</SCRIPT>
Here, picurl is used to display the source image size in pic_all.aspx. I use the HTML control. No matter what method you use, you need to read the image name or path from the database.
OBJ. offsetwidth returns the width of the displayed source image, obj. offsetwidth + 127 indicates that the window is 127 pixels larger than the image width, because you need to leave some space for the image description.
In this way, the pop-up window can be automatically adjusted according to the image size, and the pop-up page can be edited at will, because the pop-up page is a specified page, no matter what you want to edit, You can process the page as usual.