3.2 NS IE

<SCRIPT>...</SCRIPT>

This tag adds the possibility of programming inside a HTML document by using a scripting language. The functions are programmed inside the SCRIPT container.

This tag can be used in the HEAD and BODY section of the document.

To keep older browsers, that do not support scripting, from displaying the source of the scripts it is a common use to comment the contents of the SCRIPT tag, like this:

<SCRIPT LANGUAGE="JavaScript">
<!-- Hide contents from older browsers
function ShowMessage(Msg) {
  alert(Msg)
}
// End hiding the contents -->
</SCRIPT>

LANGUAGE
NS IE
Determines the programming language that is used. Possible values are JavaScript, developed by Netscape out=>. JavaScript development is based on the JAVA language, which extends and enhances the capability of HTML documents. JavaScript supports most of JAVA's expression syntax and basic control flow constructs, but without JAVA's strong type checking and static typing. Microsoft out=> developed VBScript, a scripting language based on Visual Basic.

SRC
NS
This attribute lets you specify a file as the script source (rather than embedding the script in the HTML). Script statements in a SCRIPT tag with a SRC attribute are ignored. Note, however, that the closing </SCRIPT> tag is required.

 
Source:
<SCRIPT LANGUAGE=JavaScript>
function RunExample() {
  alert('You pushed the button!');
}
</SCRIPT>
<FORM>
Push the button to show an alert box with a message.<BR>
<INPUT TYPE=BUTTON VALUE="Run example" onclick="RunExample()">
</FORM>
 
Result:
Push the button to show an alert box with a message.


Statistics Copyright © 1996, 1997 Rob Schlüter
Last updated 1997/06/27
Email: schluter@knoware.nl