<SCRIPT>
Use the script tag to define a block of script. The most common
use of this is to define client-side Javascript or VBScript. For
client-side scripting, it is recommended that you put this element
inside the HEAD section of your document.
On IIS server for windows, this tag can be used to create server-side
ASP code by using the RUNAT="server" attribute.
The closing tag for this element is required.
Attributes
Attribute |
Description |
ID |
Identifies this tag to reference in script (program code) |
SRC |
If your script code is located in an external file, this attribute should
be defined as the URI where the code can be found. |
TYPE |
A MIME type which defines the type of scripting that will be found in the
source reference or contained within the element tags. |
LANGUAGE |
Specifies the scripting language referenced by the SRC or
contained within the SCRIPT element |
DEFER |
This is a boolean attribute which requires no value. When present, it
indicates that no output will be generated when the script is executed.
This is used so that the user-agent can continue parsing and rendering
without worrying about the SCRIPT element. |
|
Example
<SCRIPT LANGUAGE="javascript" TYPE="text/javascript">
function hello() {
alert('Hello There!');
}
</SCRIPT>
Compatibility
HTML 4.01
|