Jumpstart into the Web technologies: <- Prev. Start Contents References Home Next ->
JavaScript

JavaScript is cross-platform, object-oriented scripting language, which was developed by Netscape. With JavaScript you can easily create interactive web-pages.

JavaScript is not Java! Although it has a similar name, it's totally different language!

There are 3 types of JavaScript:

We'll talk about the Client-Side JavaScript. The way you add JavaScript to the HTML page is inside:
<SCRIPT LANGUAGE=JavaScript>... </SCRIPT> .
Or you can import the external file with JavaScript:
<SCRIPT LANGUAGE="JavaScript" SRC="filename.js"></SCRIPT> .
Here is a simple example:
SourceResult
<SCRIPT LANGUAGE="JavaScript">
var msg = "Hello World!!";
function say_hi() {
  alert(msg);
}
</SCRIPT>
<FORM>
<INPUT TYPE=BUTTON NAME=hi VALUE="Say Hi!" OnClick="say_hi();">
</FORM>

I don't want to describe here the syntax of JavaScript, you can find it in any JavaScript tutorial (see references or learn from examples.

Some examples of the standard objects in Client-Side Javascript:
Note, that it's far from being a full reference, please consult Netscape Client-Side JavaScript Reference for the full list of available methods and objects.

Some examples of useful things you can do with JavaScript can be found here.

Summary:

More info on JavaScript can be found here.

Jumpstart into the Web technologies: <- Prev. Start Contents References Home Next ->

Copyright © 2000 Sergey Gribov