![]() | ![]() |
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![]() ![]() |
Determines the programming language that is used. Possible values are
JavaScript, developed by Netscape
![]() ![]() |
SRC![]() |
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: |