And to have a picture of the description of information, you can also point to one and the next page and so on.
The implementation process is as follows:
Pic_small. The code at the aspx page thumbnail is:
Copy Code code as follows:
) "Src= ' <%#" images/product/"+databinder.eval (Container.DataItem," PicUrl ")%> ' Width= "118" runat= "Server" >
ShowWindow is saved in the Openwindows.js file as follows:
Functionshowwindow (ID)
{
window.open (' pic_all.aspx?id= ' +id, ' _blank ', ' scrollbars=no ');
}
The following code can be achieved after the Point thumbnail pop-up page pic_all.aspx display picture information, the following to achieve the Pic_all.aspx page according to the size of the picture automatically adjusted.
Place the following code between the <Head></Head> of the pic_all.aspx page:
Copy Code code as follows:
<script>
Functionwindow.onload ()
{
Varobj=document.getelementbyid ("Picurl");
Window.resizeto (obj.offsetwidth+127,obj.offsetheight+75);
}
</script>
The picurl here is used to display the size of the original image in the page pic_all.aspx, I use HTML control, no matter what method you use, anyway, it is to read out the name of the picture or the path from the database.
Obj.offsetwidth get is the width of the original image displayed, obj.offsetwidth+127 that the window on the width of the picture is larger than 127 pixels, because there are some space to implement the picture description information.
This can be used to bounce out of the window can be automatically adjusted according to the size of the picture, but also free to edit the page, because the bounce out of the page is a specified page, no matter what to edit, you can deal with the same as normal processing of the page.