Inserting javascript



SCRIPT - inserts a script in the document. Text of the script itself is located between the beginning and ending tags or defined as a URL to a file containing the script, in the SRC attribute.

LANGUAGE - defines the language in which the script s written, for example, JavaScript.

SRC - defines the URL to the script.

Example 1:
1
2
3
4
5
<SCRIPT LANGUAGE="JavaScript"> 
<-- 
window.location = "http://www.ya.uk"; 
     / / -> 
</SCRIPT>
Where to place the script:

SCRIPT element can be either in the header (inside HEAD element) or in the document body (inside the BODY).
Input Form
Select form
Image in HTML page
HTML forms