Get the name of a text area:
The result of x will be:
The name property sets or returns the value of the name attribute of a text area.
The name attribute is used to reference elements in a JavaScript, or to reference form data after a form is submitted.
The name property is supported in all major browsers.
Return the name property:
Set the name property:
Value | Description |
---|---|
text | Specifies the name of the text area |
Return Value: | A String, representing the name of the text area |
---|
Change the name of a text area:
HTML reference: HTML <textarea> name attribute