The DOM Textarea form Property is used to return the text area by reference to the form that contains that text area. It returns the form object if the code successfully runs or if the text area is in the form.
- If text area is not contained in the form then it returns the reference of the form that contains the text area.
- Otherwise, If text area is not contained in the form then it returns NULL.
Example: HTML program to illustrate the DOM Textarea form Property.
Before Clicking On Button:
After Clicking On Button:
Note: Above code prints the object of the form type. To print the id or name of the form use form.id instead of form only in the script.
Supported Browsers: The browser supported by Textarea form Property are listed below:
- Google Chrome
- Internet Explorer