WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML DOM Input Password Object


Input Password Object

The Input Password object speaks to a HTML <input> component with type="password".

Access an Input Password Object

You can get to a <input> component with type="password" by utilizing getElementById():

var x = document.getElementById("myPsw"); Try it

Create an Input Password Object

You can make a <input> component with type="password" by utilizing the document.createElement() method:

var x = document.createElement("INPUT");
x.setAttribute("type", "password");

Input Password Object Properties

= Property included HTML5.

Property Description
autocomplete Sets or returns the estimation of the autocomplete trait of a secret word field
autofocus Sets or returns whether a secret key field ought to consequently get center at the point when the page loads
defaultValue Sets or returns the default estimation of a secret word field
disabled Sets or returns whether the secret key field is crippled, or not
form Returns a reference to the structure that contains the secret key field
maxLength Sets or returns the estimation of the maxlength quality of a secret key field
name Sets or returns the estimation of the name trait of a secret phrase field
pattern Sets or returns the estimation of the example characteristic of a secret word field
< placeholder Sets or returns the estimation of the placeholder property of a secret key field
readOnly Sets or returns whether a secret word field is perused just, or not
< required Sets or returns whether the secret word field must be rounded out before presenting a form
< size Sets or returns the estimation of the size trait of a secret word field
type Returns which sort of structure component a secret key field is
value Sets or returns the estimation of the esteem trait of the secret key field

Input Password Object Methods

Method Description
select() Selects the substance of a secret phrase field