Basic HTML version of Foils prepared 23 June 1997

Foil 25 JavaScript Object Model - II

From JavaScript Tutorial for Certificate Course UC Web applications Certificate -- Summer 97. by Geoffrey C. Fox, Tom Scavo

Object Hierarchy in JavaScript
Variables are written in object-oriented fashion:
parentobject.prop1[index1].prop2..propN[indexN]
There is no hierarchical inheritance in object definitions, but the ability to define object properties that are themselves objects creates a natural hierarchical naming scheme
Object methods are naturally referred to as
object...property.method(arguments)
Methods, objects, and properties are naturally divided into those defined by Navigator and those defined by the user.
Here is an example of a Navigator object with a typical property and method
  • document is a Navigator object corresponding to an HTML page
  • document.writeln("string") is a document method, which outputs "string" followed by a newline
  • document.location is a document property containing its URL



Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Wed Apr 1 1998