HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Input Password Object : Change the width of a password field
The size property sets or returns the size attribute of a password field.
The size attribute specifies the width of a password field (in number of characters).
The default value is 20.
Property | |||||
---|---|---|---|---|---|
size | Yes | 10.0 | Yes | Yes | Yes |
Return the size property:
Set the size property:
Value | Description |
---|---|
number | Specifies the width of the password field, in characters. Default value is 20 |
Return Value: | A Number, representing the width of the password field, in characters |
---|
Get the width of a password field:
var x = document.getElementById("myPsw").size;
HTML reference: HTML <input> size attribute
❮ Input Password Object