JavaScript is an object-based but not object-oriented (it doesn't support inheritance or polymorphism) programming language from Netscape that's superficially similar to Java. Where Java is a semi-compiled/semi-interpreted language, JavaScript is fully interpreted. Furthermore JavaScript is embedded directly in a web page rather than being included from a separate file. A JavaScript also has access to the items on the page it's included on so it can do things like browser detection. For example, I use the following simple JavaScript on many of my pages to prevent illegal mirrors:

/* Only sunsites are allowed to mirror this page and then
only with explicit, prior permission. For details,
send email to */
if (location.protocol.toLowerCase().indexOf("file") != 0 ) { 
  if ("sunsite") < 0) {

There are many good books about JavaScript (and not a few bad ones, I'm sure).

Previous | Next | Top | Cafe au Lait

Copyright 1997, 1999 Elliotte Rusty Harold
Last Modified April 22, 1999