Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Textarea form property

Textarea form property

Textarea Object Reference The Textarea object


Example

Return the id of the form that the textarea text box belongs to:

document

.

getElementById

(

"

myTextarea

"

)

.

value

=

"

Runoob

"

;

Try it »

Definition and Usage

The form property returns a reference to the form that contains the textarea element.

If successful, this property returns a form object.

Syntax

textareaObject.form


Browser support

property
form Yes Yes Yes Yes Yes

Technical Details

Return value: Returns a reference to the form that contains the textarea element, or null if the text box is not in a form.

Textarea Object Reference The Textarea object