Hyperevents and DOM
The structure of the DOM is hierarchical. It defines a tree structure of elements within elements. Access a particular element by chaining references from the topmost element through the intermediate elements to the desired element. You can refer to HTML elements by name, the value of their name attributes, or by their positions in the various element arrays.
self.document — The top node in the tree. Begin reference chains here. Note that some browsers require “self” while others do not.
self.document.forms.MyForm — The form on the document named MyForm.
self.document.forms.MyForm.Field1 — The input field named Field1 on the form named MyForm.
self.document.forms.MyForm.Field1.value — The current value of the input field named Field1 on the form named MyForm.