Lesson 1--Looking
View
Before we start: (We should know)
ASP stands for ActiveServerPages.ASP comes from Microsoft, which provides a neutral language platform for developing dynamic web pages.
Your script is written in plain text and saved with the .asp extension. When these scripts are called, they first use the asp script translation engine, and the function of this engine is to combine your script with information from the browser, the database, or other sources you think are appropriate. Based on the speculations listed on my homepage, I assert that you already know how to create a text document ending in .asp. I can also conclude that you already know how to put your document into a virtual directory. There are already a lot of documentation that can tell you how to accomplish the above, and discussing these issues is beyond the scope of this site to explore.
Start the topic:
The best way to immediately devote yourself to the content to be taught in this lesson is to go straight into the script below.
Here is the asscript of this lesson:
<%@LANGUAGE="JavaScript"%>
<%
Response.Write("<HTML>")
Response.Write("<BODY>")
Response.Write("HelloWorld<BR>")
Response.Write("</BODY>")
Response.Write("</HTML>")
%>
About Tags:
This is a very simple example. I bet you already understand it. Haven't you seen that those tags look very similar to the html tags? In fact, there is no difference between them at all. <%asp starts from here %>. The asp tag is marked with a "%".
About @LANGUAGE:
@LANGUAGE is set to "javascript". This means that asp will interpret the script through the javascript script engine.
Most servers set VBScript as the default scripting language. We can change a single page default scripting language by using the @LANGUAGE property. And @LANGUAGE must be set before other asp directives. So putting @LANGUAGE on the top of the script, or even hmtl would be a good idea. In any script, @LANGUAGE can only be set once. It must be independent, and do not put it in the same tag as other commands.
Other things to note:
The response is an asp object (please do not confuse it with the javascript object), and write is an asp method (please do not confuse it with the javascript method). We will have an independent chapter to explain the response.
The last thing we need to pay attention to is the difference between the asp script and the html page.
Here is the source code of what we see on the client.
All the output of the client is on it. If you haven't seen it yet, please click the link to run the script above, and then look at the source code of the output page. You will return the machete the entire html text is a complete line. That is of course not good. In large pages, it will be difficult to understand the output of html like it. Please believe me: If you connect to the header of the content you want to output on the client
If you can't tell the difference between the ends, you won't find any bugs (code).