JavaScript: The Definitive Guide

Previous Chapter 21
JavaScript Reference
Next
 

Element.form Property

Name

Element.form Property---the Form containing the element

Availability

Navigator 2.0, Internet Explorer 3.0

Synopsis

element.form

Description

The form property of a form element is a read-only reference to the Form object that contains the specified element.

The form property allows the event handlers of one form element to easily refer to "sibling" elements in the same form. When an event handler is invoked, the this keyword refers to the form element for which it was invoked. Thus, an event handler can use the expression this.form to refer to the form that contains it. From there, it can refer to sibling elements by name, or it can use the elements[] array of the Form object to refer to them by number.

See Also

"Element", "Form"


Previous Home Next
Element.focus() Book Index Element.length

HTML: The Definitive Guide CGI Programming JavaScript: The Definitive Guide Programming Perl WebMaster in a Nutshell
This HTML Help has been published using the chm2web software.