Textarea formProperty

Textarea 对象参考手册Textarea Object


Example

Return the id of the form to which the textarea belongs:

document.getElementById("myTextarea").value = "Example";

Try it Yourself »

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 textarea is not in a form.


Textarea 对象参考手册Textarea Object

Other Extensions