Textarea form eigenschap

Definitie en gebruik

form De eigenschap retourneert een verwijzing naar het formulier dat de tekstregio bevat.

Deze eigenschap retourneert het formulierobject bij succes.

Voorbeeld

Returns the id of the form containing the text area:

var x = document.getElementById("myTextarea").form.id;

Try it yourself

Syntax

textareaObject.form

Technical details

Return value:

Reference to the form element containing the text area.

If the text area is not in the form, it returns null.

Browser support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support Support Support Support Support