Matrix28.com - Free asp, C, C++, Flash, Java, Javascript, Perl, PHP, XML scripts and tutorials and resources
 



JavaScript is an interpreted programming language whose interpreter is embedded inside web browser software such as Internet explorer.

JavaScript should not be confused with the complied language Java while bearing some resemblance is a completely different language.

JavaScript first appeared in December 1995. The JavaScript language contains impressive features but for security reasons cannot read or write files with the exception of "cookie" files. These can be used to store small amounts of data on the users hard disk but the users can choose not to accept cookies.

This tutorial assumes that you have a basic knowledge of HTML, if not it is an extremely easy language and you can pick it up by reading a small tutorial.

In order to include JavaScript in a web page, a script block must first be defined in the HTML code. This identifies to the browser to expect JavaScript and not HTML. The script block maybe defined anywhere within the Body tags.

The script block consists of:

<SCRIPT TYPE = "TEXT/JAVASCRIPT">
<!- -

//- ->
</SCRIPT>

The LANGUAGE attribute was formerly used to declare JavaScript but is now depreciated in HTML 4.0.

The actual JavaScript code will be inserted between the <!-- - -> tags. These tags are there to hide the script from old browsers that do not have a scripting engine.

A JavaScript may also be called from a external .js file. This is done with an SRC attribute in the script block:

<SCRIPT TYPE = "TEXT/JAVASCRIPT" SRC = "file.js">
<!- -

//- ->
</SCRIPT>

Next Page 2 >>   
© David Lindon, © www.LindonNetworks.com.
www.Nintra.com www.BlueShadowz.com www.YY2.com www.RGForums.com
Geek Valley Free Webmaster Resources Free Milf & Swingers Free Webmaster Resources youth hostels