Asp JavaScript 教程 - Lesson 01 A General Overview

转载 2006年06月24日 13:03:00

A General Overview

Before We Start:

ASP stands for Active Server Pages. ASP comes from Microsoft and it promises a language neutral platform on which to develop dynamic web pages.

Your Scripts are written as plain text and stored in files with the .asp extension. When called upon, your script goes through the ASP script engine, which combines your scripts with information from the web surfer, possibly a database, and other sources as you see appropriate.

Based on the presumptions laid out on the home page, I assume you already know how to create text files with an .asp extension. I also assume you already know how to place your files into a virtual folder. There is a lot of documentation on how to do these things, but the subject matter is beyond the scope of this web site.

Get Started:

The best way to get into this lesson is simply to dive right into the script.

Below is the ASP Script for Lesson 01.

Response.Write("Hello World<BR>")

Click Here to run the script in a new window.


This is a pretty simple example. My bet is that you already get it. Have you noticed that ASP tags are similar to HTML tags? There is a difference. <%ASP Goes Here.%> The ASP tags use a percent sign.


The @LANGUAGE attribute is set to "JavaScript". That means ASP will run our scripts through the JavaScript (JScript) script engine.

Most servers are set by default to use VBScript. We can change the default language for a single page by using the @LANGUAGE attribute. @LANGUAGE must be set BEFORE any other ASP commands. So, it's a good idea to put @LANGUAGE right at the very top, even before your HTML headers. @LANGUAGE can only be set ONCE in any particular script. It should also stand alone; don't put any other command inside the same set of tags.

Misc. Notes:

Response is an ASP object (Not to be confused with JavaScript objects) and Write is an ASP method (not to be confused with JavaScript methods). Response gets its own lesson later on.

The last thing we need to notice on this script is the difference between the ASP script and the resulting HTML Script.

Below is the HTML source code as seen on the client side.

<HTML><BODY>Hello World<BR></BODY></HTML>

The Client Side output is all on one line. If you haven't already, click the link to run the script and then View Source Code. You will see that the entire HTML text is one unbroken line. That's bad. On lager pages, it will make the HTML output difficult to read. Trust me; you can't find bugs if you can't even make heads or tails of what you're putting out to the client.

In Lesson 02 we will fix that problem.

ASP.NET Overview

ASP.NET Overview  译:ASP.NET概述 ASP.NET is a unified Web development model that includes the services...
  • xutingzhou
  • xutingzhou
  • 2012年09月05日 15:47
  • 1767

Asp JavaScript 教程 - Lesson 02 Escape Characters

 Escape CharactersNot Out of Place: The instruction of Escape Characters in Lesson 02 seems out of p...
  • cnsdybj
  • cnsdybj
  • 2006年06月24日 13:16
  • 905

Codeforces Round #293 (Div. 2) 总结

A. Vitaly and Strings time limit per test 1 second memory limit per test 256 megabytes ...
  • zyx520ytt
  • zyx520ytt
  • 2015年12月22日 15:15
  • 248

Codeforces 842 D. Vitya and Strange Lesson (trie)

Description Today at the lesson Vitya learned a very interesting function — mex. Mex of a sequence...
  • qq_28954601
  • qq_28954601
  • 2017年08月30日 16:17
  • 544

Lesson 1 A puma at large

Listen to the tape then answer the question below. Where must the puma have come from? Pumas are lar...
  • fengyan5022
  • fengyan5022
  • 2015年12月10日 16:09
  • 252

General Overview of The System(一)

The UNIX system has become quite popular since its inception in 1969, running on machines of varying...
  • MagicCarmack
  • MagicCarmack
  • 2008年05月23日 10:43
  • 186

General System Administration Overview

General System Administration OverviewClassification of Systems:Small sites have 1 - 10 machines, al...
  • snowman_sp
  • snowman_sp
  • 2005年11月28日 23:00
  • 1135

A Brief Overview of Deep Learning

A Brief Overview of Deep Learning 【 注:本文是Ilya Sutskever受邀给Yisong Yue博客写的文章。原文在Yisong Yue博客上:http...
  • hua_007
  • hua_007
  • 2015年01月15日 14:16
  • 1508

Codeforces Round #293 (Div. 2)--A-- Vitaly and Strings - Painting

小水,WA了几次,其实不用想太多,因为str1的字典序题目中说肯定比str2的小,所以只要让str1的字典序加上1即可,所以要倒着循环,如果最后是z就要考虑进位的因素。最后在比较一下,str1 != ...
  • qwe585p
  • qwe585p
  • 2015年06月10日 11:28
  • 318

codeforce 18A
  • u013573047
  • u013573047
  • 2014年06月20日 17:51
  • 679
您举报文章:Asp JavaScript 教程 - Lesson 01 A General Overview