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
1 Variables are written in object-oriented fashion:
2 parentobject.prop1[index1].prop2..propN[indexN]
3 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
4 Object methods are naturally referred to as
5 object...property.method(arguments)
6 Methods, objects, and properties are naturally divided into those defined by Navigator and those defined by the user.
7 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

in Table To:


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