December 2001
Intermediate to advanced
480 pages
9h 22m
English
The key to understanding objects in JavaScript is to understand JavaScript’s relationship to HTML and HTML’s structure. One of the clearest and simplest structures in HTML is the form object. Table 7.1 shows the fundamental hierarchy of objects.
| Window (object) |
| Document (property of window) |
| Form (property of document) |
| Element (property of form) |
| Element value (property of element) |
In JavaScript, to reference the hierarchy, the dot (.) operator serves as a linking device for the different levels in the object hierarchy, with the highest level beginning on the left and working its way to the right. In JavaScript, a generic reference to the value of a form object would look like ...
Read now
Unlock full access