SCRIPTSCRIPT*
*Contents  *Index  *Topic Contents
*Previous Topic: SAMP
*Next Topic: SELECT

SCRIPT

Description

Specifies a script for the page that will be interpreted by a script engine.

Syntax

<SCRIPT
CLASS=classname
DEFER
EVENT=eventname
FOR=element
ID=value
LANGUAGE=JAVASCRIPT | JSCRIPT | VBSCRIPT | VBS
SRC=url
TITLE=text
TYPE=MIME-type
>

ParameterDescription
CLASS=classnameSpecifies the class of the tag being defined. This is used to associate a sub-classed style sheet with the tag.
DEFERIndicates the script block contains only functions and no in-line script. Deferring the parsing of scripts until they are needed can improve performance by decreasing the time it takes to load a document.
EVENT=eventname Specifies the event the script is being written for.
FOR=element Specifies which element is being bound to the event script. A scripting object or element ID can be specified as the element value.
ID=value An SGML identifier used as the target for hypertext links or for naming particular elements in associated style sheets. Valid ID values must begin with a letter. The underbar character, "_", may be used in the ID name. The ID should be unique throughout the scope of the document. If more than one object with the same identifier exists in a document, a collection of those named items is created that can only be referenced by ordinal position.
LANGUAGE=JAVASCRIPT | JSCRIPT | VBS | VBSCRIPT Specifies the language the current script is written in and invokes the proper scripting engine. The default value is JAVASCRIPT. This attribute overrides any TYPE= value.
JAVASCRIPT, JSCRIPT The scripting language is written in JavaScript.
VBS, VBSCRIPT The scripting language is written in VBScript.
SRC=url Specifies a URL for the associated file.
TITLE=text Used to provide advisory information.
TYPE=MIME-type Specifies the MIME type for the associated scripting engine.

Remarks

Code within the SCRIPT block that are not contained within a function are executed immediately as the page is loaded. To keep scripts from being displayed on down-level browsers, the SCRIPT block should be nested within a comment block.

This element is a block element.

Both the start and end tags are required.

Scripting Object

SCRIPT


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.