In the past few days, I sorted out my previous websites developed with Asp.net and made some JS special effects.CodeTo record and share it with you. The sample code will be shared later.
1. Album (showimages)
Many people will encounter the need to build a user's album when building a website, and I used to write a JS Code from someone else on the Internet when I was practicing the website (JS will not be written, but it will only be changed ).
Below is:
Explain the relationship between pages:
Showimages. aspx: User album page
Images. aspx: the user loads the image page.
The implementation idea of the entire example is as follows: showimages. aspx is the page where JS Code is located and used to build a user album. In JS, the SRC of each IMG is actually the content loaded on the images. ASPX page. The images. ASPX page binds images based on the photo ID.
Modify the start ID and end ID of the photo in the background code of showimages. aspx.
View code
Public Partial Class Showimages: system. Web. UI. Page { Protected Void Page_load ( Object Sender, eventargs e ){ Int I = 1 ; Int J = 4 ; First. Value = " 1 " ; // Start ID of the photo in the user album Ipicnum. value = convert. tostring (I> J )? I + J- 1 : J ); // ID of the end of a photo album }}
For the convenience of the image, the ID is assigned directly.
2. scoring JS
:
This is also very simple JS... But I also changed it from the Internet. You can use a form and a sumbit button to submit scores and comments.
Download code example: http://dl.vmall.com/c0blknwk6g