In order to make our guest book more beautiful, let us to the last chapter of the simple guest book run color, and then make its message in another separate page display.
So how do you polish the guest book? The background of the message form interface can't you? And in order for the content of the message form to be more structured, is it necessary to frame the contents of the message form? Think it over, now let's do it immediately to our guest book whitewash refresh.
Step One: Add the background to the message form first
I don't have to waste my breath here on this question. As for how to add an undertone to the contents of the form and then use the virtual box, we can change the "define the display format" section of the program in the previous chapter. I just added a little background to the contents of the message form. My approach is very simple to just code:
Line3 = "< TABLE border=1>< tr>< td>"
Line3 = Line3 & "Your message:" & Memo & "</td></tr></table>" Changes are as follows:
Line1 = "< TABLE border=0 bgcolor= #33CCCC width=781>< tr>< td>"
Line1 = Line1 & Name & String (5, "") & Email & "</td></tr></table>" Line2 = "< T Able border=0 bgcolor= #33CCCC width=781>< tr>< td> "
Line2 = Line2 & "Subject:" & Subject & "</td></tr></table>"
Line3 = "< TABLE border=0 bgcolor= #33CCCC width=781>< tr>< td>"
Line3 = Line3 & "Your message:" & Memo & "</td></tr></table>"
I would like to remind you here again not to use FontPage98 or DreamWeaver2.0 and other homepage making software to make changes.
Step two, how to let the message another page to show it?
We can save the HTML code in step three as a guestbook2.htm after removing the guestbook1.asp described in the first chapter and manage1.asp the last sentence: Response.Redirect " Guestbook1.asp "changed to: Response.Redirect" book2.asp "Save as manage2.asp." In fact, the above two changes are only to achieve such a situation, that is: the original "Guidance client browser to guestbook1.asp to see the message" Change to "guide the client browser to the new Web page book2.asp to watch the message." (Note: guestbook2.htm and manage2.asp in the source code involved in the file name to make the appropriate changes, I do not repeat here)
Since in the manage2.asp, we guide the client browser to book2.asp to see the message, then we have to create a new book2.asp, and open the message record in book2.asp. We can cut down the following code and coexist into book2.asp.
< html>
< head>
< meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
< title> message Book </title>
< link rel= "stylesheet" href= ". /images/text.css ">
< body text= "#000000" bgcolor= "#FFFFFF" does not background= "b01.jpg" >
< h2 align= "CENTER" > Message Book <!--#include file= "Book2.txt"-->
< a href= "guestbook2.htm" class= "Text2" >
< p align= "center" > Back to Message Thin </a>
</p>
</body>
To the guest book to polish, we can according to their own likes and dislikes to set, which is relatively simple. But have we ever thought that it would just show all the messages on one page
Is it a bit inappropriate? Just imagine, if the message is only so ten or 20, but if we have hundreds or even thousands of message records, God, I really want to wait until when the message interface is fully displayed? And with so many messages on the same page, does it make you interested to check your messages?
In order to manage the message display, make the guest book more practical, easier to manage, we will begin in the next chapter to learn the database version of the guest books written.