ASP JavaScript Tutorial - Lesson 01 A General Overview

xiaoxiao2021-04-09  325

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.

<% @ Language = "javascript"%>

<%

Response.write ("")

Response.write ("")

Response.write ("Hello World
)

Response.write ("")

Response.write ("")

%>

Click Here to Run The Script in a New window.

Tags:

This is a pretty simpe example. My Bet is this you already get it. Has you noticed That ASP Tags? There is a difference.

<% ASP Goes Here.%>

The ASP Tags Use a Percent Sign.

@Language:

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 AS AS JAVAScript Objects and WRITE IS AS JAVAScript Methods. Response Gets Its Own Lesson Later ON.

. Et..............

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

Hello World

The Client Side output is all on one line. If you have not 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 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 Well Fix That Problem.

转载请注明原文地址:https://www.9cbs.com/read-133088.html

New Post(0)