Password name Property
Password Object
Definition and Usage
The name property sets or returns the name of the password field.
The name attribute is used to send data to the server after form submission, or to reference form data in JavaScript.
Note: After form submission, only the name attribute of form elements is used to pass data values.
Syntax
Set the name attribute:
passwordObject.name="
name
"
Return the name attribute:
passwordObject.name
Browser support





All major browsers support the name property.
Example
Example
The following example gets the name of the password field:
Try it »
Password Object