Author: cnbruce from:
Blue ideal
By learning to the Request object, you can understand that the request object is used by the server.
Get information about the client.
But as a server and client interact, is it still lacking the server side to the client
Send information? Object Response is for this responsibility.
The object that is responsible for passing the information to the user is Response, which can dynamically respond to the client's request, and return the dynamically generated response result to the client browser.
First, Response.write
The Write method in Response is the most frequent one, Write is written: write the specified string to the current HTTP output.
1, Write.asp
<% response.write ("Hello, World" & "
") randomizeresponse.write "Arbitrary number" & rnd () & "
"%>
The information shown later is the information displayed, and it can be included in parentheses or directly written (note that there is between the response.write.
Space).
Writing string information or HTML code is related, with quotation marks; the function or variable of the ASP itself is not required, directly.
And regardless of string information, HTML code, function or variables, is uses & numbers (for VBScript)
I encountered one above
Random function RND (), which returns a value of less than 1 but greater than or equal to 0.
It should be noted that before calling the RND, first useless parameters
The Randomize statement initializes the random number generator, which has a seed based on the system timer.
If Randomize is missing, the random seed cannot be continued.
The following is an example of a random function, resulting in a random background color effect:
Run code