Input Password form Property

Definition and Usage

form The property returns a reference to the form containing the password field.

This property returns the form object on success.

Note:This property is read-only.

Example

Get the id of the form containing the <input type="password"> element:

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

Try It Yourself

Syntax

passwordObject.form

Technical Details

Return Value:

Reference to the form element containing the password field.

Returns if the password field is not in the form null.

Browser Support

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