Adding Script Commands

Domain Hosting image
Web Hosting
Dedicated server
ssl certificate
Web Design image
Email

A script is a series of commands or instructions. Unlike HTML tags, which simply format text or read in a graphic, video, or sound file, a script command instructs the Web server to perform an action. Script commands can store a user's name in a variable, display the user's name in a page returned to the browser, or store the user's name in a database. Script commands are differentiated from text by delimiters. A delimiter is a character or sequence of characters that marks the beginning or end of a unit. In the case of HTML, these delimiters are the less (<) and greater symbols, which enclose HTML tags.

ASP uses the delimiters < % and % > to enclose script commands. You can include within the delimiters any command that is valid for the scripting language you are using. The following example shows a simple HTML page that contains a script command.

<HTML>
<BODY>
This page was last refreshed on < % = Now % >
</BODY>
</HTML>

The VBScript function now returns the current date and time. When the Web server processes this page, it replaces < % = Now % > with the current date and time and returns the page to the browser.

This page was last refreshed on 07/2/23 2:20:00 PM.

Commands enclosed by delimiters are called primary script commands. These commands are processed using the primary scripting language. Any command that you use within script delimiters must be valid for the primary scripting language. By default, the primary scripting language is VBSCript. You can set a different language.

For server side scripting, you only use the <SCRIPT> element to define procedures in languages other than the primary scripting language.



Domain Name Search

www.


Copyright (C) 2007. Web Domain design hosting. All rights reserved.