[Chapter 21] Reference: Element.form
Author: David Flanagan
Date: Fri Aug 29 11:15:32 1997

#

| Chapter 21 JavaScript Reference |

# 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"

Element.focus() |  | Element.length