Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Password size Property

Password size Property

Password Object Reference Password Object


Definition and Usage

The size property sets or returns the width of the password field (in number of characters).

The default value is 20.

Syntax

Set the size property:

passwordObject.size=

integer

Return the size property:

passwordObject.size


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the size property


Example

Example

Set the width of the password field:

Runoob Tutorial(runoob.com)

Password:

Try it »


Password Object Reference Password Object