Compiling asp applications in javascript-Lesson 1-Overview

Source: Internet
Author: User

Lesson 1-Overview
Overview
Before you start: (we should know)
ASP stands for Active Server Pages. ASP 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, which serves to include your scripts and those from viewers or databases, or combine information from other sources that you think are appropriate. Based on the speculation listed on my homepage, I assert that you already know how to create a text document ending with. asp. I can also conclude that you already know how to put your documents into a virtual directory. There are a lot of documents that tell you how to do the above, and the discussion of these issues is beyond the scope of this site to explore.
Start question:
The best way to invest in the content to be taught in this lesson is to directly dive into the following script.
The following is the asp script of this course:
<% @ LANGUAGE = "JavaScript" %>
<%
Response. Write ("<HTML> ")
Response. Write ("<BODY> ")
Response. Write ("Hello World <BR> ")
Response. Write ("</BODY> ")
Response. Write ("</HTML> ")
%>
About labels:
This is a simple example. I bet you understand it. Didn't you see the tags look like html tags? In fact, there is no difference between them. <% Asp start here %>. Asp labels are marked with "%.
@ LANGUAGE:
@ LANGUAGE is set to "javascript ". This means that asp will explain the script through the javascript script engine.
Most servers use VBScript as the default script language. You can use the @ LANGUAGE attribute to change the default scripting LANGUAGE for a single page. @ LANGUAGE must be set before other asp commands. Therefore, placing @ LANGUAGE in a script or even the top of hmtl is a good method. In any script, @ LANGUAGE can be set only once. It must be independent. Do not place it and other commands in the same tag.
Other considerations:
Response is an asp object (do not confuse it with a javascript Object), and write is an asp method (do not confuse it with a javascript method ). Response we will have an independent chapter to explain.
The last thing we should note is the difference between asp scripts and html pages.
The following is the source code we see on the client.

All the client output is above. If you haven't seen it yet, click the link to run the above script and view the source code of the output page. The entire html text is a complete line. Of course it is not good. In a large page, html output is hard to read. Believe me: If you connect to the header of the content you want to output on the client
Otherwise, you will not find any bugs in the code.
In the second lesson, we will solve this problem.
Original article and example address: http://aspjavascript.com/lesson01.asp
Http://huahuablog.blogspot.com
Author: James Clark

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.