Overview


What is JavaScript?

JavaScript (JS) is an object-based programing language.

  • JavaScript is interpreted by the browser. JavaScript code is typically embedded right in HTML pages
  • JavaScript programs are written using objects, which have properties, associated data and behavior (methods) belonging to them
  • JavaScript provides various objects and methods or functions, and you can create new ones

Object-oriented concepts

  • Properties are where the objects store their data, and are generally the attributes that you get or set
  • Methods contain the various functions that can operate on an object
  • Events are actions recognized by an object, such as a mouse moving over it, or the user clicking on an object, such as a link

A real world example:

  • Consider a speaker phone as an object
  • Property: speaker phone volume. telephone.speakerVolume=2
  • Method: dialing the telephone. telephone.dial("312-413-0003")
  • Event: the phone is ringing. ring(callerName)

What else is JavaScript?

  • JavaScript is not Java
  • JavaScript is relatively easy to learn
  • It is a scripting language
  • JavaScript enables client-side processing
  • JS programs are built into the Web page in the form of a script

Versions of JavaScript

  • JavaScript 1.0 (Netscape 2.0)
  • JavaScript 1.1 (Netscape 3.x, MSIE 4.x)
  • JavaScript 1.2 (Netscape Communicator 4.0 to 4.04)
  • JavaScript 1.3 (Netscape Comunicator 4.06 to 4.5)
  • JavaScript 1.4 (Netscape Communicator 4.7.x and later)
  • Microsoft JScript ~ JavaScript 1.1
  • WWW Consortium standard: ECMA-262 JavaScript ~ JavaScript 1.1+

What is JavaScript good for?

  • Generating on-the-fly Web pages or HTML
  • Facilitating user interaction with Web pages
  • Adding programming control to HTML
  • Client-side processing
  • Validating fields in HTML forms
  • Detecting browsers and browser environment
  • Opening and managing browser windows and frames
  • Programming navigation buttons
  • Java and Plug-in interface and control via LiveConnect
  • Key component of Dynamic HTML
  • Dressing up your Web pages

Alternatives to JavaScript

  • JScript, Java, CGI scripts, VBScript, ActiveX controls
  • Plug-ins like Flash, Shockwave and others
  • Other scripting languages like PHP, Python and Lingo

 

JavaScript Seminar Home | Previous | Next


Last Modified: March 2, 2001 — Instructional Technology Lab